Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/alinaqi/maggy/analyze-workspacegit clone --depth 1 https://github.com/alinaqi/maggyWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.01955 |
| Opus 5 | $0.00000 | $0.00978 |
| Sonnet 5 | $0.00000 | $0.00391 |
| Haiku 4.5 | $0.00000 | $0.00196 |
Grade A, and why
analyze-workspace scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 306 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/analyze-workspace
Full dynamic analysis of workspace topology, dependencies, and contracts.
Trigger
Run this command when:
- First time setting up workspace awareness
- Major refactor or new module added
- Weekly scheduled refresh
/sync-contractsreports too much drift- Switching to work on a different workspace
Behavior
Phase 1: Topology Discovery (~30 seconds)
🔍 Analyzing workspace topology...
Checking workspace indicators:
✓ Found turbo.json (Turborepo)
✓ Found pnpm-workspace.yaml
✗ No nx.json
✗ No lerna.json
Workspace type: Monorepo (Turborepo)
Root: /Users/ali/code/myapp
Discovering modules...
✓ apps/web (package.json found)
✓ apps/api (pyproject.toml found)
✓ packages/shared-types (package.json found)
✓ packages/db (package.json found)
Modules found: 4
Phase 2: Module Analysis (~60 seconds)
For each module, analyze:
📦 Analyzing apps/web...
Tech stack: Next.js 14, TypeScript, TailwindCSS
Entry point: src/app/layout.tsx
Key directories: src/lib/, src/components/, src/types/
Dependencies: @repo/shared-types, @repo/ui
External calls: fetch → apps/api (15 files)
Token estimate: 18K full, 5K summarized
📦 Analyzing apps/api...
Tech stack: FastAPI, Python 3.12, SQLAlchemy
Entry point: app/main.py
Key directories: app/routes/, app/schemas/, app/models/
Dependencies: packages/db (internal)
Exposes: OpenAPI spec (47 endpoints)
Token estimate: 24K full, 7K summarized
📦 Analyzing packages/shared-types...
Tech stack: TypeScript
Entry point: src/index.ts
Exports: 34 types
Consumed by: apps/web, apps/api (codegen)
Token estimate: 3K
📦 Analyzing packages/db...
Tech stack: Drizzle ORM, TypeScript
Entry point: src/index.ts
Tables: 12
Migrations: 23
Token estimate: 8K full, 2K schema only
Phase 3: Contract Extraction (~45 seconds)
📜 Extracting contracts...
OpenAPI Detection:
✓ apps/api/openapi.json (47 endpoints, 23 schemas)
GraphQL Detection:
✗ No GraphQL schemas found
TypeScript Types:
✓ packages/shared-types/src/index.ts (34 exports)
Pydantic Schemas:
✓ apps/api/app/schemas/ (23 models)
Database Schema:
✓ packages/db/schema/ (12 tables)
Contract sources registered: 5 files
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 306 lines · 0 tokens per session scan A f51e427d2f9d
analyze-workspace is a command published in the GitHub repository alinaqi/maggy (704 stars, last pushed 14d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,955 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
writ-approve
Advance the current Writ workflow phase with an explicit tool-confirmed advance. NOT a replacement for pattern-match approval detection; this command spends the token that detection mints (see Authorization below).
speckit.checklist
Generate a custom checklist for the current feature based on user requirements.
speckit.specify
Create or update the feature specification from a natural language feature description.
speckit.clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
speckit.implement
Execute the implementation plan by processing and executing all tasks defined in tasks.md.
speckit.tasks
Generate an actionable, dependency-ordered tasks.md for the feature based on available design artifacts.