home / skills / plurigrid / asi / amp-team-usage

amp-team-usage skill

/skills/amp-team-usage

This skill helps you monitor Amp usage by estimating local sessions, listing GitHub org members, and checking recent thread activity.

npx playbooks add skill plurigrid/asi --skill amp-team-usage

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
2.6 KB
---
name: amp-team-usage
description: Amp Team Usage
version: 1.0.0
---

# Amp Team Usage

Check concurrent users and team members on an Amp account.

## Problem

Amp CLI has no direct command for viewing team/workspace members or concurrent sessions. The web dashboard requires manual login.

## Solution

### 1. Local Concurrent Sessions

Count running Amp processes on the local machine:

```bash
ps aux | grep -E 'amp.*dist/main.js' | grep -v grep | wc -l
```

Detailed view:

```bash
ps aux | grep -E 'amp.*dist/main.js' | grep -v grep
```

### 2. Team Members via GitHub CLI

If Amp workspace is linked to a GitHub org:

```bash
# List org members
gh api orgs/YOUR_ORG/members | jq -r '.[].login'

# Full details with GraphQL
gh api graphql -f query='
{
  organization(login: "YOUR_ORG") {
    membersWithRole(first: 50) {
      totalCount
      nodes {
        login
        name
      }
    }
  }
}' | jq
```

### 3. Recent Thread Activity

Check thread activity across the account:

```bash
# Use find_thread tool with date filters
find_thread query="after:1d" limit=50
```

## What Didn't Work

- `amp --help` has no team/account commands
- `amp workspace list`, `amp team list`, `amp account` don't exist
- Direct API calls to `ampcode.com/api/team` require browser auth
- Playwright login requires interactive Google OAuth

## Quick Reference

| Method | Command |
|--------|---------|
| Local sessions | `ps aux \| grep 'amp.*main.js' \| grep -v grep \| wc -l` |
| Org members | `gh api orgs/ORG/members \| jq '.[].login'` |
| Member count | `gh api graphql -f query='{organization(login:"ORG"){membersWithRole{totalCount}}}'` |



## Scientific Skill Interleaving

This skill connects to the K-Dense-AI/claude-scientific-skills ecosystem:

### Graph Theory
- **networkx** [○] via bicomodule
  - Universal graph hub

### Bibliography References

- `general`: 734 citations in bib.duckdb



## SDF Interleaving

This skill connects to **Software Design for Flexibility** (Hanson & Sussman, 2021):

### Primary Chapter: 8. Degeneracy

**Concepts**: redundancy, fallback, multiple strategies, robustness

### GF(3) Balanced Triad

```
amp-team-usage (○) + SDF.Ch8 (−) + [balancer] (+) = 0
```

**Skill Trit**: 0 (ERGODIC - coordination)


### Connection Pattern

Degeneracy provides fallbacks. This skill offers redundant strategies.
## Cat# Integration

This skill maps to **Cat# = Comod(P)** as a bicomodule in the equipment structure:

```
Trit: 0 (ERGODIC)
Home: Prof
Poly Op: ⊗
Kan Role: Adj
Color: #26D826
```

### GF(3) Naturality

The skill participates in triads satisfying:
```
(-1) + (0) + (+1) ≡ 0 (mod 3)
```

This ensures compositional coherence in the Cat# equipment structure.

Overview

This skill helps you discover concurrent Amp sessions and team membership when the Amp CLI lacks direct account/team commands. It provides lightweight, pragmatic techniques to count local Amp processes, query GitHub organizations for workspace members, and surface recent thread activity. The goal is quick visibility without visiting the web dashboard or requiring interactive OAuth.

How this skill works

It inspects the local process table to count running Amp instances and lists detailed process entries for troubleshooting. For teams backed by a GitHub organization, it uses the GitHub CLI to enumerate members and fetch membership counts via REST or GraphQL. It also shows how to query recent thread activity with a simple find_thread command to detect active users or bots across the account.

When to use it

  • You need a quick headcount of Amp instances running on a machine.
  • You want to list workspace/team members and the workspace is linked to a GitHub org.
  • You need an offline or scriptable method without logging into the Amp web dashboard.
  • You want to audit recent thread activity or detect concurrent sessions across the account.
  • When Amp CLI lacks team/account subcommands and browser auth is inconvenient.

Best practices

  • Run the local process checks under the same user or with appropriate privileges to avoid missing sessions.
  • Use gh CLI authenticated to the correct org and limit GraphQL queries to reasonable page sizes (first:50).
  • Combine process counts with detailed ps output to distinguish automated agents from interactive sessions.
  • Store GitHub tokens securely (env vars or credential store); avoid embedding tokens in scripts.
  • Use date filters for thread queries (e.g., after:1d) to reduce noise and focus on recent activity.

Example use cases

  • Count Amp instances on a build server: ps aux | grep -E 'amp.*dist/main.js' | grep -v grep | wc -l
  • List GitHub org members for a linked workspace: gh api orgs/YOUR_ORG/members | jq -r '.[].login'
  • Get member count via GraphQL: gh api graphql -f query='{organization(login:"ORG"){membersWithRole{totalCount}}}'
  • Inspect recent activity across threads: find_thread query="after:1d" limit=50
  • Debug a runaway Amp process by viewing detailed ps output and correlating with user accounts.

FAQ

Does this require admin access to Amp?

No. Local process inspection requires only permissions to list processes on the host. GitHub queries require gh authentication for the target org.

Can I use these methods for non-GitHub workspaces?

The GitHub-based member lookup only works if the workspace links to a GitHub org. For other providers you must use their respective APIs or the Amp web dashboard.