agentleFS
funky-eyesfunky-eyes/best-copilot/skills/repo-init-official/SKILL.md

repo-init-official

Skill12 starsChanged 6 months agoApache-2.0View on GitHub

Use inside repo-init-scan to try a target-local `init` skill, Claude `/init`, or `copilot init`, normalize official init output into `.github/instructions/project.instructions.md`, and decide whether manual fallback is still needed.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 0 are distinctive, and 6 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.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    When this stage has just been loaded inside repo-init-scan, the next assistant action must attempt the official initializer or report …

    line 10
  2. Very specific:

    Prefer a directly invokable bare runtime /init command when the active session exposes one.

    line 18
  3. Very specific:

    Do not treat chat output alone as success.

    line 20
  4. Very specific:

    If official init runs but only returns chat text without a verified facts file, fails, times out, or reports missing authentication, report …

    line 24
  5. Very specific:

    If official init is unavailable, does not write the file, or leaves those fact categories incomplete, hand off to repo-init-manual-fallback.

    line 25
  6. Very specific:

    When a target-local init skill is present but does not write a recognized artifact, the helper may continue to the runtime command fallback.

    line 39

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Repo Init Official

Immediate Execution Rule

When this stage has just been loaded inside repo-init-scan, the next assistant action must attempt the official initializer or report official_init_unavailable, then emit ## Repo Init Official. Do not stop at Skill(...repo-init-official...) Successfully loaded, and do not inspect business source before this stage returns.

Contract

  • This is the best-copilot official-init stage. Loading /best-copilot:repo-init-official or Skill(best-copilot:repo-init-official) makes this stage's instructions available; it is not the same thing as running the runtime's built-in /init.
  • Try a target-local init skill first when it is discoverable and the active runtime can invoke skills non-interactively. This means skills/init/SKILL.md for Claude Code and Copilot plugin directories, plus .claude/skills/init/SKILL.md for Claude Code. For Copilot CLI, skills/init/SKILL.md is mechanically invokable only when the target root is a plugin directory with plugin.json; otherwise report local_init_skill_status=uninvokable_missing_plugin_json and fall back to copilot init. Invoke successful candidates from the target root through the bundled official helper, record attempted=target_local_init_skill, and treat them as successful only when a recognized init artifact is written on disk.
  • In Copilot CLI or other shell-capable runtimes, if no target-local init skill succeeds and copilot init exists, run copilot init automatically before manual fallback through repo-init-official/scripts/run-copilot-native-init.sh. This is the normal command fallback for Copilot.
  • In Claude Code, if no target-local init skill succeeds, attempt Claude Code's built-in /init command automatically through the bundled helper script before manual fallback when the helper path is discoverable from CLAUDE_SKILL_DIR or the active plugin directory. This is the native command shown by Claude as "Initialize a new CLAUDE.md file with codebase documentation"; it is not a best-copilot skill. The helper uses a bounded claude --bare --permission-mode acceptEdits -p "/init" attempt so the native Claude initializer can write the target CLAUDE.md without loading this plugin recursively. BEST_COPILOT_CLAUDE_NATIVE_INIT_TIMEOUT_SECONDS may shorten the default 45-second timeout for smoke tests. If the helper cannot be located, report official_init_unavailable and continue to manual fallback instead of blocking solely on helper discovery.
  • Prefer a directly invokable bare runtime /init command when the active session exposes one. This bare /init is distinct from best-copilot plugin skills such as /repo-init-official or /best-copilot:repo-init-official.
  • Normalize useful output into the target .github/instructions/project.instructions.md when the official initializer produces enough facts directly. Recognized helper artifacts such as target CLAUDE.md, .github/copilot-instructions.md, and AGENTS.md are also successful official evidence; repo-init-manual-fallback must then preserve and normalize their useful facts into .github/instructions/project.instructions.md.
  • Do not treat chat output alone as success. Either the facts file must exist on disk with real facts or explicit unknown gaps, or the helper must have written a recognized artifact that the manual fallback can normalize.
  • In Claude Code, do not report official_init_unavailable merely because the assistant cannot call a UI slash command directly. First try the helper script. If the helper succeeds and creates .github/instructions/project.instructions.md, CLAUDE.md, AGENTS.md, or another recognized init artifact, report success.
  • In Copilot CLI, do not report official_init_unavailable merely because the assistant loaded this skill text. First try the target-local init skill when present, then copilot init through the bundled helper when the shell command is available. If the helper succeeds and creates .github/instructions/project.instructions.md, .github/copilot-instructions.md, AGENTS.md, or another recognized init artifact, report success.
  • Report official_init_unavailable only when no official initializer is available or known in the current runtime, no copilot init command can be run, and no prior /init / copilot init output or artifacts are available to normalize.
  • If official init runs but only returns chat text without a verified facts file, fails, times out, or reports missing authentication, report official_init_no_write, official_init_incomplete, or official_init_unavailable and continue to repo-init-manual-fallback. Do not stop after loading this skill.
  • If official init is unavailable, does not write the file, or leaves those fact categories incomplete, hand off to repo-init-manual-fallback.
  • This stage does not certify scaffold completeness and does not write best-copilot.md; those remain owned by repo-init-manual-fallback.

Output

## Repo Init Official
- status: success|official_init_unavailable|official_init_no_write|official_init_incomplete
- attempted: target_local_init_skill|copilot_init|claude_native_slash_init|bare_init|none
- native_command: /init when attempted=claude_native_slash_init
- native_command: copilot init when attempted=copilot_init
- artifacts: <files created or normalized, such as CLAUDE.md, .github/copilot-instructions.md, and .github/instructions/project.instructions.md>

When a target-local init skill is present but does not write a recognized artifact, the helper may continue to the runtime command fallback. In that case attempted may contain a comma-separated attempt chain such as target_local_init_skill,claude_native_slash_init.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.