Install in seconds
Install this skill
Copy the command and run it in your terminal. You can review the source before installing.
terminal
git clone https://github.com/crbnos/carbon

Works with Git. The repository opens in your current directory.

πŸ€–
AI EngineeringTypeScript

Create AGENTS.md

by crbnos

Creates or refreshes an AGENTS.md for Carbon packages or ERP modules by reading source code, grounding every claim in real functions, tables, and exports. Ideal when adding modules or performing freshness audits.

2.3K stars318 forksAdded 2026/07/20
agentic-platformassemblylinebusinesserpleanmanagementmanufacturingmcp-servermespostgresqlqmsreact-routersupabasetypescript

Documentation

README

create-agents-md β€” generate or refresh an AGENTS.md

Produce a prescriptive AGENTS.md grounded in source. Every claim MUST trace to a real function name, table name, import path, or file β€” grep and verify; never describe what "might" exist.

Announce at start: "Using the create-agents-md skill β€” generating/refreshing the AGENTS.md for {target}."

Step 1: Identify the target

  • Package: packages/{name}/ β†’ budget ≀100 lines
  • Module: apps/erp/app/modules/{name}/ β†’ budget 60–100 lines

Step 2: Read the actual source

# Module:
ls apps/erp/app/modules/{name}/
grep -n "^export" apps/erp/app/modules/{name}/{name}.service.ts
grep -n "export const.*=.*z\." apps/erp/app/modules/{name}/{name}.models.ts
grep -rn "\.from(" apps/erp/app/modules/{name}/{name}.service.ts | sed 's/.*\.from("\([^"]*\)").*/\1/' | sort -u
grep -rn "\.rpc(" apps/erp/app/modules/{name}/ | sed 's/.*\.rpc("\([^"]*\)".*/\1/' | sort -u
grep -rn "requirePermissions" apps/erp/app/routes/x+/{name}* | head -10

# Package:
ls packages/{name}/src/
cat packages/{name}/src/index.ts
cat packages/{name}/package.json | jq '.exports'

Step 3: If refreshing, read the existing file

  • Preserve human-added notes, warnings, and domain explanations.
  • Update stale function/table/import names (verify each with grep).
  • Add new exports/tables/patterns; remove references to deleted code.

Step 4: Read the relevant rules

Find the .ai/rules/ files that govern this area (via the root AGENTS.md Task Router) and reference them in the Rules References section β€” only files that actually exist.

Step 5: Write it

Module template

# {Module Name} Module

{One line: what this module does in the ERP domain.}

## Key Domain Concepts
{3–6 terms a non-manufacturing AI needs. **Term** β€” plain-English definition.
 Include status lifecycles.}

## Safety
### Always
- MUST {do X} β€” `{function/table}` depends on it.   {3–5 rules, grounded}
### Ask First
- {action} β€” {why risky}.                            {2–3 items}
### Never
- {action} β€” {what breaks}.                          {2–3 items}

## Validation Commands
```bash
pnpm exec turbo run typecheck --filter=erp
pnpm --filter erp test
```

## Key Data Model
| Table / View | Purpose |
|---|---|

## Key Service Functions
- `{functionName}` β€” {what it does}   {only what another module would call}

## Copy From   {OPTIONAL β€” only if this module is a good template}
| To build… | Copy from… | Then change… |

## Related Modules
- **{module}** β€” {integration point}

## Rules References
- `.ai/rules/{file}.md` β€” {what it covers}

Package template

# @carbon/{name}

{One line.}

## Always / Ask First / Never
{Same shape as the module template.}

## Validation Commands
```bash
pnpm --filter @carbon/{name} typecheck
pnpm --filter @carbon/{name} test
```

## Key Exports
| Subpath | Provides |
|---------|----------|
| `.` | {…} |          {real subpaths from package.json exports}

## Cross-References
{rules, related packages, consuming apps}

Done when β€” verify each line

  • Every function name exists: grep -n "export.*{name}" {file} hits
  • Every table name exists: grep in the service file hits
  • Every import path is real (check the barrel / exports field)
  • Every referenced .ai/rules/ file exists
  • Tone is prescriptive ("MUST use X"), not descriptive ("X is used")
  • Line count within budget; no {placeholder} / TBD left
  • Modules: Key Domain Concepts present; Never section present
  • Refresh: human-added notes preserved

Anti-patterns

  • Listing functions you didn't grep for (renamed/deleted ones will lie)
  • Abstract architecture prose ("uses a service layer" says nothing)
  • Copying a sibling AGENTS.md and renaming β€” every module has different tables, functions, and concepts
  • Vague bullets: "Services handle data access" ❌ vs "MUST use insertManualInventoryAdjustment for quantity changes β€” it creates ledger entries and updates tracked entities" βœ…

More from crbnos

Other Claude Code skills by this author in the directory.

🌐
1w ago

Agent Browser

Browser automation CLI for AI agents. Use it to navigate pages, fill forms, click buttons, take screenshots, extract data, test web apps, or automate any browser task.
Automation
+0%2.3K325
πŸ”‘
1w ago

Carbon Dev Auth

Authenticates a local browser session against the Carbon ERP dev server using DEV_BYPASS_EMAIL, enabling automated testing and manual verification. Leaves session open for subsequent commands.
Automation
+0%2.3K325
πŸ“š
1w ago

Carbon Docs

Author, edit, or extend Carbon's documentation site β€” a Fumadocs + Next.js app. Use for reader-facing guides, reference pages, and documentation IA. Grounds every claim in source code and follows a warm-paper house style.
Writing
+0%2.3K325
βœ…
1w ago

Check and Commit

Runs a sequence of code quality gates (type generation, formatting, linting, typecheck, tests, build, i18n) on changed files, fixes simple issues, and commits only when all checks pass. Ideal after a code fix, task execution, or manual changes before committing.
Quality
+0%2.3K325
πŸ”„
1w ago

Conductor

Drive a single work item through a doer→gate→judge→keep-or-revert→ledger cycle to a gated PR, unattended. Use for tightly-scoped bugs, usability tweaks, or small features with explicit acceptance criteria.
Automation
+0%2.3K325
πŸ€–
1w ago

Create AGENTS.md

Generates or refreshes AGENTS.md files for Carbon packages and ERP modules by analyzing the actual source code. Ensures every documentation claim is verified against real functions, tables, and exports.
Writing
+0%2.3K325