askit-build-chain-contract
Skill2 starsChanged 2 months agoApache-2.0View on GitHub
Creates and improves a plugin's chain contract (agents/_chain-permitted.yaml) to the Advanced Skill Library Standard. Use when a skill or subagent invokes another component and you need to declare the permitted inter-component invocations, or to resolve S4 orphan or phantom findings.
In this repository27 other files it gives its agents.
- AGENTS.mdAGENTS.md
- askit-backlogSkill
- askit-build-agents-mdSkill
- askit-build-commandSkill
- askit-build-docsSkill
- askit-build-hookSkill
- askit-build-mcpSkill
- askit-build-output-styleSkill
- askit-build-samplesSkill
- askit-build-settingsSkill
- askit-build-skillSkill
- askit-build-statuslineSkill
- askit-build-subagentSkill
- askit-build-workflowSkill
- askit-capability-advisorSkill
- askit-capability-gap-analysisSkill
- askit-capability-whats-newSkill
- askit-decisionSkill
- askit-deprecateSkill
- askit-evaluateSkill
- askit-init-marketplaceSkill
- askit-init-pluginSkill
- askit-migrateSkill
- askit-releaseSkill
- askit-standards-watchSkill
- askit-template-managerSkill
- REPLACE-with-kebab-case-name-matching-this-directorySkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
When a skill or subagent declares a chain: to another component and you need to permit it, or when evaluate reports an S4 orphan (an …
- Very specific: line 25
Run node scripts/evaluate.mjs .
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
askit-build-chain-contract
Purpose
Author a plugin's chain contract: the explicit declaration of which components may invoke which others (Standard sec 3.6). A chain contract is a CONDITIONAL MUST - required if and only if a component invokes another, so a plugin with no inter-component invocation ships no contract (no empty governance files). Two modes: create authors agents/_chain-permitted.yaml (and the optional agents/_pairing.yaml); improve resolves S4 findings. Authoring depth is in references/authoring-chain-contracts.md. Follows the shared builder contract (../../docs/reference/builder-pattern.md).
When to use
When a skill or subagent declares a chain: to another component and you need to permit it, or when evaluate reports an S4 orphan (an invocation not permitted) or phantom (a contract entry naming a missing component).
create mode
- Scan components for
chain:declarations (which caller invokes which callees). Skip the contract entirely if nothing chains (the conditional MUST). - Author
agents/_chain-permitted.yaml: one entry per caller, listing the components it may invoke. Copytemplates/chain-permitted.yamlif none exists. - Optionally author
agents/_pairing.yamlfor recommended (not required) skill plus subagent pairings. - Evaluate (
node scripts/evaluate.mjs . --json) until S4 is clean: everychain:invocation is permitted (no orphan) and every contract entry names an on-disk component (no phantom).
improve mode
- Run
node scripts/evaluate.mjs . --jsonand read the S4 findings. - For an orphan, add the missing
caller: [callee]permission. For a phantom, fix the misspelled name, remove the stale entry, or create the missing component. - Re-run to confirm S4 is clean.
Scope
The contract is agent-agnostic: one agents/_chain-permitted.yaml (no per-target form). It binds exactly when there is an invocation to make safe (sec 3.6), so it is a safety mechanism, not ceremony. S4 (chain-contract integrity) flags orphans and phantoms; do not ship an empty contract for a plugin that does not chain.
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.

