

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1# AGENTS.md — `src/commands/`23Per-command agent-optimized usage and structure guide.45## Command folder convention67Every command is a folder. `index.ts` is the command class file. All related8code — business logic, helpers, tests, and optional agent guide — colocates inside9the folder. Subcommands are subfolders.1011```12src/commands/13 <topic>/14 <verb>/15 index.ts ← command class (extends DifyCommand; the ONLY file the registry discovers)16 run.ts ← optional behavior owner (not a command, invisible to the registry)17 handlers.ts ← helpers18 guide.ts ← agent guide string (optional)19 *.test.ts ← tests20 <nested-verb>/ ← subcommand (e.g. auth/devices/list/)21 index.ts22 _shared/ ← intra-topic shared code (only when needed by 2+ siblings)23 <shared>.ts24```2526The registry generator (`pnpm tree:gen` → `src/commands/tree.generated.ts`) discovers27commands only via `**/index.+(js|cjs|mjs|ts)`. All other files in command28folders are invisible to the registry — add freely without glob exclusions.29Folders prefixed with `_` (e.g. `_shared/`, `_strategies/`) are excluded from30registry discovery and from coverage checks.3132## Adding a new command33341. Create `src/commands/<topic>/<verb>/index.ts` extending `DifyCommand`.351. Keep small owner-local behavior in `index.ts`; extract sibling modules such as `run.ts` or `handlers.ts` when logic needs independent tests, reuse, or a clearer owner.361. Run `pnpm tree:gen` to regenerate the command tree (also runs implicitly via `prebuild`/`predev`/`pretest`).371. Run `pnpm test` to verify coverage.3839## Adding an agent guide4041<!-- prettier-ignore -->421. Create `src/commands/<topic>/<verb>/guide.ts` exporting a plain string:43```ts44 export const agentGuide = `45 WORKFLOW46 1. ...4748 ERROR RECOVERY49 ...50 `51```521. Import and assign in `index.ts`:53```ts54 import { agentGuide } from './guide.js'5556 export default class MyCmd extends DifyCommand {57 override agentGuide(): string {58 return agentGuide59 }60 }61```621. The guide appears at the bottom of `difyctl <cmd> --help` automatically.631. Agents call `difyctl <cmd> --help` to read both structural help and workflow guidance.6465## Shared utilities6667Code used by two or more commands lives in `src/<domain>/` (e.g. `src/auth/`,68`src/api/`, `src/errors/`). Do not put broadly shared code inside a command folder.69Intra-topic shared code (used only within one topic's commands) uses `_shared/`70within that topic folder.71
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| langgenius/difyweb/features/agent-v2/AGENTS.md · 152k | AGENTS.md | agent-behaviour | 16/100 | today | |
| langgenius/difyapi/AGENTS.md · 152k | AGENTS.md | apiagent-behaviour | 54/100 | 14 days ago | |
| langgenius/difycli/AGENTS.md · 152k | AGENTS.md | testtypestesting-strategy | 58/100 | 14 days ago | |
| langgenius/difydify-agent/AGENTS.md · 152k | AGENTS.md | styleagent-behaviour | 58/100 | 14 days ago | |
| langgenius/difye2e/AGENTS.md · 152k | AGENTS.md | setupstyletesting-strategyapi | 72/100 | today | |
| langgenius/difye2e/features/agent-v2/AGENTS.md · 152k | AGENTS.md | setupbuildtesting-strategyapi+1 | 58/100 | 14 days ago | |
| langgenius/difyweb/AGENTS.md · 152k | AGENTS.md | teststyletesting-strategyui+1 | 47/100 | today | |
| langgenius/difypackages/dify-ui/AGENTS.md · 152k | AGENTS.md | stylesecurityuido-not | 50/100 | today | |
| langgenius/difyAGENTS.md · 152k | AGENTS.md | no sections | 40/100 | 11 days ago |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| TryGhost/Ghoste2e/AGENTS.md · 55k | AGENTS.md | setupteststylearch+2 | 100/100 | today | |
| mui/material-uiAGENTS.md · 99k | AGENTS.md | setupbuildtestlint-format+9 | 100/100 | 14 days ago | |
| code-yeongyu/oh-my-openagentpackages/web/AGENTS.md · 68k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 13 days ago | |
| aaif-goose/gooseAGENTS.md · 53k | AGENTS.md | setupbuildtestlint-format+7 | 100/100 | 8 days ago | |
| deepseek-ai/deepseek-harnessnative/landlock-run/AGENTS.md · 104k | AGENTS.md | setupteststylearch+3 | 100/100 | today | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago | |
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 201k | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago | |
| elastic/elasticsearchx-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/AGENTS.md · 78k | AGENTS.md | buildtestlint-formatstyle+2 | 100/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/langgenius-dify-cli-src-commands-agents)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.