repo-init-gate
Skill12 starsChanged 6 months agoApache-2.0View on GitHub
Use before repo-init-scan to cheaply decide whether a target repository already satisfies the current best-copilot init contract by reading only the root `best-copilot.md` sentinel.
In this repository41 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- brainstormingSkill
- change-verificationSkill
- context-packet-fastpathSkill
- core-workflow-contractSkill
- developer-workflowSkill
- development-branch-closeoutSkill
- dispatching-parallel-agentsSkill
- evolution-loopSkill
- executing-plansSkill
- frontend-designer-workflowSkill
- frontend-design-guardrailsSkill
- quality-assurance-workflowSkill
- repo-init-manual-fallbackSkill
- repo-init-officialSkill
- repo-init-scanSkill
- root-cause-fixer-workflowSkill
- root-cause-investigationSkill
- search-fastpathSkill
- security-reviewer-workflowSkill
- senior-project-expertSkill
- senior-project-expert-workflowSkill
- spec-execution-fastpathSkill
- specification-writer-workflowSkill
- spec-review-gauntletSkill
- structured-reviewSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- target-instructions-bootstrapSkill
- target-memory-bootstrapSkill
- target-spec-bootstrapSkill
- td-java-coding-guidelinesSkill
- td-python-coding-guidelinesSkill
- technical-architect-workflowSkill
- test-driven-developmentSkill
- verification-before-completionSkill
- web-experience-auditSkill
- workspace-isolationSkill
- writing-plansSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use this tiny skill before loading repo-init-scan.
- Distinctive: line 12
When loaded, the next assistant action must be only this gate.
- Distinctive: line 22
If the helper cannot be located or shell execution is unavailable, execute the inline gate exactly:
- Very specific: line 24
Read only the target root best-copilot.md, or determine that it is missing or unreadable.
- Very specific: line 27
If the frontmatter version is current, skip repo-init-scan.
- Very specific: line 46
If skill invocation fails, run the preflight helper when available.
≈ “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
Repo Init Gate
Use this tiny skill before loading repo-init-scan. It is the repeat-request fast path.
Immediate Execution Rule
When loaded, the next assistant action must be only this gate.
Preferred shell-capable path: run the bundled preflight helper from the target root when it is discoverable:
<best-copilot-skills-dir>/repo-init-gate/scripts/run-preflight.sh "$PWD" claudeFor an installed Claude Code plugin, resolve the helper from CLAUDE_SKILL_DIR when present, or from the active plugin skills/ directory. The helper reads only the target root best-copilot.md on the fast path. If the sentinel frontmatter version is not current, it immediately delegates to repo-init-scan/scripts/bootstrap-after-gate-failure.sh, which owns official init, manual fallback, artifact verification, and the final ## Init Summary.
If the helper cannot be located or shell execution is unavailable, execute the inline gate exactly:
- Read only the target root
best-copilot.md, or determine that it is missing or unreadable. - Parse only its YAML frontmatter and compare
versionto the current contract version below. - Emit the
## Repo Init Gateoutput block below. - If the frontmatter version is current, skip
repo-init-scan; otherwise runrepo-init-scanor its single-command bootstrap helper before any business-source read/search.
Forbidden before this block: search, grep, glob, source reads, project structure exploration, code intelligence, planning, dispatch, implementation summaries, scaffold writes, or reading .github/instructions/**, memories/**, spec/**, AGENTS.md, or CLAUDE.md.
Contract
Canonical best-copilot.md content written by init:
---
version: "0.8.0"
---- Current YAML frontmatter
version: "0.8.0":ready+skip_repo_init_scan. - Missing, unreadable, invalid frontmatter, missing version, or version mismatch: report the corresponding gate result and run
repo-init-scan. - Extra content after a current frontmatter block is not a reason to run scan on repeat requests. Writers should still keep the canonical three-line sentinel when creating or repairing the file.
- Explicit reinitialize/repair requests bypass this gate and run
repo-init-scan. - This gate is read-only;
repo-init-scanowns sentinel creation/repair. - If skill invocation fails, run the preflight helper when available. Otherwise do the same single-file read inline and report
HARNESS_DEGRADED skill_invocation_unavailable.
Output
## Repo Init Gate
- gate_result: ready|needs_init|version_mismatch|invalid_sentinel
- next_action: skip_repo_init_scan|run_repo_init_scan
- evidence: target_root_best_copilot_md=present|missing|unreadable, observed_version=<version-or-none>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.

