add-global-mode-target
Skill27 starsChanged 2 months agoMITView on GitHub
Use when adding global mode support for one existing agentsmesh target from a target-structure/global-path doc. Covers contract extraction from docs, descriptor.global layout wiring, generator/import/reference-rewrite touchpoints, strict tests, docs updates, and final verification for one target at a time.
In this repository167 other files it gives its agents.
- AGENTS.mdAGENTS.md
- src/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-agent-targetSkill
- am-agent-code-debuggerSkill
- am-agent-code-documenterSkill
- am-agent-code-refactorSkill
- am-agent-code-reviewerSkill
- am-agent-code-security-auditorSkill
- am-agent-code-standards-enforcerSkill
- am-agent-security-auditorSkill
- am-agent-test-engineerSkill
- am-agent-test-runnerSkill
- am-agent-typescript-developerSkill
- am-command-buildSkill
- am-command-code-simplifySkill
- am-command-commitSkill
- am-command-planningSkill
- am-command-planSkill
- am-command-ponytail-auditSkill
- am-command-ponytail-debtSkill
- am-command-ponytail-gainSkill
- am-command-ponytail-helpSkill
- am-command-ponytail-reviewSkill
- am-command-ponytailSkill
- am-command-reviewSkill
- am-command-shipSkill
- am-command-specSkill
- am-command-testSkill
- api-and-interface-designSkill
- browser-testing-with-devtoolsSkill
- changelog-generatorSkill
- ci-cd-and-automationSkill
- code-review-and-qualitySkill
- code-reviewerSkill
- code-simplificationSkill
- context-engineeringSkill
- debugging-and-error-recoverySkill
- deprecation-and-migrationSkill
- docs-and-examplesSkill
- documentation-and-adrsSkill
- doubt-driven-developmentSkill
- frontend-ui-engineeringSkill
- git-workflow-and-versioningSkill
- grillingSkill
- grill-meSkill
- handoffSkill
- homebrew-packagingSkill
- idea-refineSkill
- incremental-implementationSkill
- interview-meSkill
- lessonsSkill
- library-testingSkill
- package-release-engineeringSkill
- performance-optimizationSkill
- planning-and-task-breakdownSkill
- ponytail-auditSkill
- ponytail-debtSkill
- ponytail-gainSkill
- ponytail-helpSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
40 rules. About 0 are common, 28 are distinctive, and 12 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈28
Distinctive · estimate
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Use this skill when the task is to add global mode support for one existing target after you have a target-specific document that describes …
- Very specific: line 12
Read ./references/global-mode-target-checklist.md before editing code.
- Very specific: line 27
Use add-agent-target for new targets.
- Distinctive: line 33
Start from the target doc and verify it against the live target implementation.
- Distinctive: line 34
Treat current code as the source of truth for project-mode behavior.
- Distinctive: line 35
Write failing tests first for every new global-mode behavior.
- Distinctive: line 36
Keep the change target-scoped.
- Very specific: line 37
Add or update descriptor.global and keep project/global layout semantics explicit.
- Distinctive: line 38
Verify link rewriting and import normalization for the target's global paths, not just generation paths.
- Distinctive: line 39
Test unsupported global features explicitly.
- Distinctive: line 40
Update docs if the supported-tools matrix, README, or global-mode docs change.
- Distinctive: line 41
Run the full verification stack before claiming completion.
- Distinctive: line 45
Do not infer global paths from project-mode paths.
- Distinctive: line 46
Do not hardcode the target's global paths in shared cleanup or reference code when descriptor metadata can own them.
- Distinctive: line 47
Do not stop at “files generate”.
- Distinctive: line 48
Do not silently mark a target as globally supported if only a subset of features work natively.
- Very specific: line 59
Read src/targets/<target>/index.ts, constants.ts, generator.ts, importer.ts, and linter.ts.
- Distinctive: line 63
Write failing tests first.
- Very specific: line 64
Add unit tests for target layout metadata (descriptor.global, supported/unsupported features).
- Distinctive: line 65
Add generation tests for global paths and root artifacts.
- Distinctive: line 66
Add import/reference-rewrite tests if the target can import from global files.
- Distinctive: line 67
Add stale-cleanup coverage if managed outputs differ from project mode.
- Very specific: line 68
Add command/integration coverage that proves the existing --global CLI surface works for the new target where applicable.
- Distinctive: line 71
Prefer target metadata over shared branching.
- Distinctive: line 73
Keep managed outputs, root instruction paths, and path resolvers explicit.
- Distinctive: line 74
If only some features are global, encode that precisely and keep unsupported ones absent or skipped.
- Distinctive: line 77
Update shared scope-aware path or import code only if the target truly needs it.
- Distinctive: line 78
Keep shared changes generic and descriptor-driven.
- Distinctive: line 79
If the target doc reveals a shared architectural gap, fix the gap once rather than adding one-off target branches.
- Distinctive: line 80
Do not re-architect CLI scope handling unless the target proves a real shared gap.
- Distinctive: line 82
Update docs and matrix surfaces.
- Very specific: line 83
Update README.md and website/src/content/docs/reference/supported-tools.mdx if support levels or notes change.
- Very specific: line 84
Update docs/plan-global-mode.md if the target behavior clarifies the implementation contract.
- Distinctive: line 87
Run targeted tests during iteration.
- Distinctive: line 88
Run the full verification stack at the end.
- Very specific: line 99
If the target imports or rewrites links in global scope: src/core/reference/rewriter.ts src/core/reference/output-source-map.ts …
- Very specific: line 104
If managed output ownership changes: src/core/generate/stale-cleanup.ts
- Very specific: line 106
If the target needs command-surface proof: tests/unit/cli/commands/*.test.ts tests/integration/*global*.test.ts
- Distinctive: line 110
Read the checklist reference for the full test and review matrix.
- Very specific: line 119
Add narrower unit/integration/e2e commands while iterating, but do not skip the full stack.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Purpose
Add Global Mode Target
Use this skill when the task is to add global mode support for one existing target after you have a target-specific document that describes the native global file paths and behavior.
Read ./references/global-mode-target-checklist.md before editing code. Treat it as the minimum implementation and QA checklist.
When To Use
- The target already exists in
src/targets/<target>/ - You have a target doc with native global paths or global behavior
- The repository-wide global-mode foundation already exists (
init|install|generate|import|diff|lint|watch|check|merge|matrix --global) - The work is scoped to one target at a time
Do Not Use This Skill For
- Adding a brand-new target from scratch
- Defining the shared global-mode architecture for the first time
- Guessing a target's global behavior without a concrete doc or official source
Use add-agent-target for new targets. Use this skill only for the per-target global-mode pass.
Non-Negotiable Rules
MUST
- Start from the target doc and verify it against the live target implementation.
- Treat current code as the source of truth for project-mode behavior; preserve it unless the target doc requires a change.
- Write failing tests first for every new global-mode behavior.
- Keep the change target-scoped. Do not scatter new target-specific branches through shared code if descriptor metadata can carry the behavior.
- Add or update
descriptor.globaland keep project/global layout semantics explicit. - Verify link rewriting and import normalization for the target's global paths, not just generation paths.
- Test unsupported global features explicitly. If the target has no meaningful native global support, encode that and test the skip/warning behavior.
- Update docs if the supported-tools matrix, README, or global-mode docs change.
- Run the full verification stack before claiming completion.
MUST NOT
- Do not infer global paths from project-mode paths.
- Do not hardcode the target's global paths in shared cleanup or reference code when descriptor metadata can own them.
- Do not stop at “files generate”; global import, reference rewriting, and stale cleanup must also be checked when applicable.
- Do not silently mark a target as globally supported if only a subset of features work natively.
Workflow
- Extract the contract from the doc.
- Record the target's native global root.
- Record which features are globally supported: rules, commands, agents, skills, MCP, hooks, ignore, permissions.
- Record root-instruction behavior, fallback paths, legacy paths, and any GUI-only/unsupported areas.
- Record whether import from global files is meaningful and lossless.
- Cross-check the live target implementation.
- Read
src/targets/<target>/index.ts,constants.ts,generator.ts,importer.ts, andlinter.ts. - Identify the current project layout in
descriptor.project. - Identify where global behavior can reuse the same structure and where it cannot.
- Read
- Write failing tests first.
- Add unit tests for target layout metadata (
descriptor.global, supported/unsupported features). - Add generation tests for global paths and root artifacts.
- Add import/reference-rewrite tests if the target can import from global files.
- Add stale-cleanup coverage if managed outputs differ from project mode.
- Add command/integration coverage that proves the existing
--globalCLI surface works for the new target where applicable.
- Add unit tests for target layout metadata (
- Implement the target-global layout.
- Prefer target metadata over shared branching.
- Fill
descriptor.globalfor supported targets. - Keep managed outputs, root instruction paths, and path resolvers explicit.
- If only some features are global, encode that precisely and keep unsupported ones absent or skipped.
- Wire shared behavior only where necessary.
- Update shared scope-aware path or import code only if the target truly needs it.
- Keep shared changes generic and descriptor-driven.
- If the target doc reveals a shared architectural gap, fix the gap once rather than adding one-off target branches.
- Do not re-architect CLI scope handling unless the target proves a real shared gap.
- Update docs and matrix surfaces.
- Update
README.mdandwebsite/src/content/docs/reference/supported-tools.mdxif support levels or notes change. - Update
docs/plan-global-mode.mdif the target behavior clarifies the implementation contract.
- Update
- Verify and QA.
- Run targeted tests during iteration.
- Run the full verification stack at the end.
- Apply the local
post-feature-qaskill before marking the work done.
Required Touchpoints
- Target descriptor and layout metadata:
src/targets/<target>/index.ts - Shared target lookup/path helpers:
src/targets/catalog/builtin-targets.tssrc/core/reference/map-targets.tssrc/core/reference/map.ts - If the target imports or rewrites links in global scope:
src/core/reference/rewriter.tssrc/core/reference/output-source-map.tssrc/core/reference/import-rewriter.tssrc/core/reference/import-map-builders.ts - If managed output ownership changes:
src/core/generate/stale-cleanup.ts - If the target needs command-surface proof:
tests/unit/cli/commands/*.test.tstests/integration/*global*.test.ts
Read the checklist reference for the full test and review matrix.
Required Verification
pnpm lintpnpm typecheckpnpm buildpnpm test
Add narrower unit/integration/e2e commands while iterating, but do not skip the full stack.
Completion Standard
The task is not done until all of the following are true:
- The target's global contract is derived from the provided doc and encoded in code, not left implicit.
descriptor.globalis either implemented correctly or omitted intentionally for unsupported targets.- Global generation paths are tested.
- Global import and reference rewriting are tested when the target supports them.
- Managed outputs and stale cleanup are correct for the target's global footprint.
- Docs and support matrix entries are current.
- Full verification passes.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

