Agent skill

Firstmate Coding Guidelines

by kunchenguid in kunchenguid/firstmate

Agent-only reference for changing firstmate's shared, tracked material per AGENTS.md section 1.

MITAuto-check passedAgent Workflows

Install Firstmate Coding Guidelines

skills CLI
$ npx skills add kunchenguid/firstmate --skill firstmate-coding-guidelines -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install kunchenguid/firstmate firstmate-coding-guidelines --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/kunchenguid/firstmate.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/firstmate-coding-guidelines .claude/skills/firstmate-coding-guidelines && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
firstmate-coding-guidelines
GitHub stars
7.6k
Token cost
~3.1k tokens
SKILL.md length
1,764 words
Files
1
Skills in repo
29
Repo updated
First seen
Licence
MIT

At a glance

Agent-only reference for changing firstmate's shared, tracked material per AGENTS.md section 1.

  • Works in 7 steps: Does the firstmate AGENT need this on… → Does the agent need it only in a… → Is it public product, setup, or… → …
  • Hygiene for new skills
  • SKILL.md covers Knowledge-placement decision…, One-owner rule, Inline-stub pattern and Size discipline, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Firstmate Coding Guidelines is an agent skill from kunchenguid/firstmate. Agent-only reference for changing firstmate's shared, tracked material per AGENTS.md section 1. Use before editing any of that material, whether working as firstmate directly or as a crewmate briefed on a firstmate-repo task. Covers the knowledge-placement decision tree, the one-owner rule for contracts, the inline-stub pattern for content moved into a skill, AGENTS.md size discipline, trigger hygiene for new skills, and repo style rules (one sentence per line, plain dash, no agent co-author, shellcheck-clean bin…

Its SKILL.md is about 3.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering Agent instruction files and Plain language and style rules. The repository describes itself as: Talk to one agent. Ship with a crew. The licence is MIT.

When your agent uses it

  • Hygiene for new skills
  • Repo style rules (one sentence per line
  • No agent co-author
  • Shellcheck-clean bin scripts

Example prompts

  • “/firstmate-coding-guidelines”

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Does the firstmate AGENT need this on every session or every turn to operate?
  2. Does the agent need it only in a nameable situation - a spawn, a recovery, a specific wake type, a specific lifecycle step?
  3. Is it public product, setup, or user/operator reference?
  4. Is it contributor/maintainer architecture?
  5. Is it active reusable verification for a current guarantee?
  6. Is it task or incident evidence - chronology, transcripts, branches, temporary paths, failed hypotheses, or delivery proof?
  7. Is it mechanics - exact flags, exact commands, exact paths?

What it can do on your machine

Read from SKILL.md and the folder at commit 53b5bc1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Firstmate Coding Guidelines loads about 3.1k tokens when it runs. Until then it costs about 153 tokens; SKILL.md has 1,764 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~153
When it runs · the whole SKILL.md, loaded when a task matches
~3.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from kunchenguid/firstmate at commit 53b5bc1, republished under its MIT licence (© kunchenguid). 1,764 words, ~3,145 tokens.

Download SKILL.mdSave it as .claude/skills/firstmate-coding-guidelines/SKILL.md (or your agent's skills folder).
name
firstmate-coding-guidelines
description
Agent-only reference for changing firstmate's shared, tracked material per AGENTS.md section 1. Use before editing any of that material, whether working as firstmate directly or as a crewmate briefed on a firstmate-repo task. Covers the knowledge-placement decision tree, the one-owner rule for contracts, the inline-stub pattern for content moved into a skill, AGENTS.md size discipline, trigger hygiene for new skills, and repo style rules (one sentence per line, plain dash, no agent co-author, shellcheck-clean bin scripts, colocated tests, and maintainer-verification evidence).
user-invocable
false
metadata.internal
true

firstmate-coding-guidelines

Load this before changing firstmate's shared, tracked material, as defined by AGENTS.md section 1. It exists because AGENTS.md grew from 585 to 958 lines between its last two restructures, entirely from conditional detail added inline instead of routed to its right home. Applying the rules below on every change is what keeps that from happening again.

Knowledge-placement decision tree

Before writing a new fact anywhere in this repo, ask where it belongs, in this order.

  1. Does the firstmate AGENT need this on every session or every turn to operate? If yes: AGENTS.md, inline.
  2. Does the agent need it only in a nameable situation - a spawn, a recovery, a specific wake type, a specific lifecycle step? If yes: an agent-only skill under .agents/skills/, whose description states its load trigger; leave a one-line inline pointer in AGENTS.md only when an always-loaded rule must name the skill.
  3. Is it public product, setup, or user/operator reference? If yes: the surface classified for that audience in docs/documentation-audiences.md, limited to current behavior, setup, supported limits, stable invariants, concise rationale, and current verification entry points.
  4. Is it contributor/maintainer architecture? If yes: the classified maintainer-architecture owner for stable ownership, extension points, mechanism boundaries, and safety rationale.
  5. Is it active reusable verification for a current guarantee? If yes: an explicitly classified maintainer-verification record may keep current dates, versions, exact commands, and exact output.
  6. Is it task or incident evidence - chronology, transcripts, branches, temporary paths, failed hypotheses, or delivery proof? If yes: keep it in the private task report or PR evidence by default, after distilling every unique current fact into its authoritative owner.
  7. Is it mechanics - exact flags, exact commands, exact paths? If yes: the script's own header comment plus its --help output, not prose in AGENTS.md, a skill, or a second documentation owner.

Stop at the first tier that answers yes. Do not place a fact at a more convenient tier than the one this tree gives you. The machine-consumed inventory in docs/documentation-audiences.json is the single classification owner for maintained prose surfaces; do not add parallel front matter or a second audience list.

One-owner rule

Every contract - a data format, a state machine, a decision procedure - is stated in full exactly once. Every other mention of it is a one-line cross-reference, never a restatement. A single deliberate one-line reinforcement at a genuine risk point is allowed, for example a "don't forget X" placed exactly where forgetting X is costly. Restating the contract's substance a second time is not allowed: the two copies will drift the moment only one is edited. When you touch a contract, patch, replace, or prune the owner's existing language rather than appending a new clause or paragraph wherever possible, then grep the repo for its other mentions and update the cross-references, not duplicate the change into a second full copy.

Inline-stub pattern

When content moves out of AGENTS.md into a skill, decide what stays behind by asking one question: what must survive with no skill loaded? That is the trigger condition for loading the skill, plus any safety-critical fact that fires on a wake the skill itself is not loaded for. Everything else - the procedure, the mechanism, the surrounding detail - moves out completely. Do not leave a partial restatement behind "just in case". A partial copy is exactly the duplication the one-owner rule forbids. The model to copy is AGENTS.md section 8's "Away-mode and quiet-mode stub": it keeps only the skill-invocation triggers inline and points everything else at the /afk, /quiet, and away-quiet-supervision skills.

Size discipline

Apply the decision tree above to every line you are about to add to AGENTS.md. If an addition needs more than a few lines of conditional detail (detail that matters only in a specific situation) or reference detail (a wire format, an exact schema, historical rationale), you are almost certainly adding it to the wrong file. AGENTS.md's token cost is paid by every session of every fleet member, every time, whether or not that session ever hits the situation the new lines describe. A skill's cost is paid only by the sessions that actually load it. When in doubt, write the fact into the skill or doc first by patching that owner's existing language, and add only the one-line trigger to AGENTS.md.

Trigger hygiene

A new skill is dead weight if nothing loads it. Every new skill needs its load trigger declared in its description, which is the always-loaded trigger index; add an inline AGENTS.md pointer only in the operating section whose always-loaded rule must name it. State the trigger as a condition ("load before X", "load on Y wake"), never as a vague pointer. Briefs for tasks that touch firstmate's own tracked material should tell the crewmate to load this skill. bin/fm-brief.sh's REPO argument is a caller-supplied string with no reliable signal that it names firstmate's own repo, unlike a project registered in data/projects.md, so there is no clean point inside the scaffold to detect this case automatically. Firstmate adds this skill's load instruction to firstmate-repo briefs by hand instead. CONTRIBUTING.md's "Development" section carries the same instruction as a durable reminder.

Compatibility and enforcement

Before changing shared tracked behavior, review every affected supported primary harness and runtime backend rather than checking only the adapters active in the current fleet. Mark an axis not applicable only after inspecting its integration surface, and update the corresponding verification evidence when behavior changes.

For critical safety, routing, startup, and supervision infrastructure, prefer deterministic and idempotent enforcement over relying on agent memory alone. Keep instructions as the authority and discovery layer, but make repeated execution converge safely and make invalid or unsafe states fail closed wherever the runtime can enforce them.

Show full SKILL.md (817 more words)Show less
Harness-dependent checks

This section is the single owner of the rule and of how to satisfy it.

A check is harness-dependent when its verdict comes from something the vendor emits: a process name, rendered output, a spinner or keybind glyph, a banner, or a key the harness binds. Anything in that class must be proven end to end against the real harness, because a stub or fake agent can only confirm the assumption already written into the stub. That proof is authorized to spend tokens; the cost is small against a check that silently stops working.

Build the check on the most structural signal that answers the question, and prefer a kernel or protocol fact over anything a release note could change. When a rendered surface is genuinely the only source, read more than one independent signal and let any of them carry a positive verdict, so no single vendor string is load-bearing. Where a surface signal is unavoidable, back it with a guard that fails loudly naming the harness and version rather than degrading quietly.

Every such check needs two tests, because they fail for different reasons:

  • A portable regression in tests/ that pins the logic with real processes and no harness, so CI enforces the classifier everywhere it runs tmux. Drive the signals apart deliberately and assert the verdict survives losing one; assert the divergence itself so the case cannot go quietly vacuous. Confirm which signal a given construction actually blinds on each supported platform rather than assuming, because the same trick can break different sources on macOS and Linux.
  • A live guard in the live-harness-optin family (bin/fm-test-run.sh) that exercises every INSTALLED harness for real and fails naming the harness and version. Report an absent harness explicitly rather than passing silently over it, and refuse a pass that checked nothing. Open it with fm_live_gate from tests/lib.sh, which is the single owner of that decision: a guard that spends no model tokens runs by default wherever its tools are installed, a guard that submits prompts stays opt-in, and its own variable or FM_LIVE forces it on (an absent tool then fails rather than skips) or off. The portable serial CI lane has no credentials and installs the public Pi package, so token-free guards exercise the available Pi surfaces while unavailable tools capability-skip; run a prompt-submitting guard after every harness upgrade and before trusting refreshed per-harness evidence.

Record the dated per-harness result in docs/verification/runtime-backends.md, and point at the live guard as the command that refreshes it, rather than leaving a version-scoped observation to rot into a false claim.

Documentation change review

For every changed maintained prose surface, identify its inventory audience, authoritative owner, current-behavior relevance, destination for supporting evidence, and any unique safety fact that removal could lose. Move or delete evidence only after the current owner and regression pointer are verified. After all documentation, review-fix, and lint-fix commits, review the complete branch diff again against those criteria rather than reviewing only the latest commit. Run bin/fm-doc-audience-check.sh; it enforces classification, README setup routing, local link targets, and owner pointers without keyword-linting legitimate evidence prose.

No-mistakes test configuration

Never configure a deterministic suite-walk commands.test in any repository's no-mistakes config, whether it selects the full suite, changed tests, a family, or a fixed script list. Targeted validation belongs to the no-mistakes evidence path, while CI owns broad deterministic regression coverage. Firstmate PR #3644 demonstrated the cost: pinning a 75-162-script walk took 32.7 minutes per validation, while removing it restored the 3.6-minute targeted-validation posture.

Repo style rules

  • Put one full sentence per line in tracked Markdown.
  • Never wrap multiple sentences onto one physical line.
  • Plain dash -, never an em dash.
  • Never add an agent name as a commit co-author.
  • bin/*.sh and bin/backends/*.sh must pass shellcheck.
  • Run Firstmate production-library tests and commands that source bin/ scripts under bash explicitly, never through the tool shell's default interpreter.
  • Run bin/fm-lint.sh before treating a script change as done; it is the single owner of the lint definition that CI and the no-mistakes pre-push gate both invoke, its own header owns what that definition covers, and it refuses to run under any other version of either linter.
  • When a task names a specific tool, implement the work with that tool, or explicitly flag the substitution and its new dependency footprint for review before shipping.
  • Colocate tests with the existing pattern in tests/, name them <subject>.test.sh, and extend an existing script rather than inventing a new runner.
  • Tests must exercise behavior through an executable or public interface and must never assert implementation-source bytes, including through parsers, regexes, snapshots, or indirect wrappers.
  • A maintainer-verification record under docs/verification/ records active empirical facts, not assumptions or task chronology.
  • Include the date, version, exact commands run, and exact output needed to support the current guarantee.
  • Keep incident chronology and delivery evidence in private task reports or PR evidence unless a concise rationale is required to maintain a current safety boundary.

© kunchenguid, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/firstmate-coding-guidelines of kunchenguid/firstmate.

Open the folder on GitHubat commit 53b5bc1

Compare with similar skills

Firstmate Coding Guidelines next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Firstmate Coding Guidelines compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Firstmate Coding Guidelines this skillkunchenguid/firstmate7.6k—~3.1kAutomated safety check: PassMIT
Audit Session Metricscentminmod/my-claude-code-setup2.7k—~2kAutomated safety check: PassMIT
Talk Normalhexiecs/talk-normal1.9k—~784Automated safety check: PassMIT
Ponylang Prose Reviewponylang/ponylang-website160—~2.9kAutomated safety check: PassBSD-2-Clause
Inherit Legacy Styleaffaan-m/ECC274k1 repos~2.1kAutomated safety check: NotesMIT
Rnd Code Simplifychendongqi/OPB-Skills125—~2.2kAutomated safety check: PassNone

Similar skills

  • Audit Session Metrics

    centminmod/my-claude-code-setup

    Audit a session-metrics JSON export for token-usage waste and produce a plain-English findings report.

    2.7k GitHub stars~2k tokensUpdated 10 days ago
    Agent WorkflowsAuto-check passed
  • Talk Normal

    hexiecs/talk-normal

    Installs an always-on set of rules into your agent's workspace config that cuts filler, hedging and padded closings from its replies.

    1.9k GitHub stars~784 tokensUpdated 5 mo ago
    Agent WorkflowsAuto-check passed
  • Ponylang Prose Review

    ponylang/ponylang-website

    Ensemble review of ponylang blog and Last Week in Pony prose.

    160 GitHub stars~2.9k tokensUpdated 3 days ago
    Agent WorkflowsAuto-check passed
  • Prevent AI style drift on legacy projects by scanning the codebase for implicit conventions, resolving conflicts with the operator one at a time, and writing an enforceable .ai-style-rules.md…

    274k GitHub starsUsed in 1 repo~2.1k tokens
    Agent WorkflowsAuto-check: notes
  • Rnd Code Simplify

    chendongqi/OPB-Skills

    Expert code simplification and refactoring specialist that autonomously enhances code clarity, consistency, and maintainability while preserving exact functionality.

    125 GitHub stars~2.2k tokensUpdated 7 mo ago
    DevelopmentAuto-check passed
  • Using Agent Skills

    addyosmani/agent-skills

    Meta-skill for choosing which workflow skill fits the task at hand, plus always-on habits: surface assumptions, stop on confusion, push back, keep it simple and stay in scope.

    102k GitHub starsUsed in 4 repos~2.4k tokens
    Agent WorkflowsAuto-check passed

More from kunchenguid/firstmate

All 29 skills in this repo
  • Project Management

    kunchenguid/firstmate

    Agent-only procedure for Firstmate project management. An agent skill from kunchenguid/firstmate.

    7.6k GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • Stow

    kunchenguid/firstmate

    Sweep the current conversation for durable knowledge - user preferences, project facts, operational gotchas, standing decisions, and unfinished next steps - and file each through explicit…

    7.6k GitHub stars~5.1k tokensUpdated today
    Auto-check passed
  • Updatefirstmate

    kunchenguid/firstmate

    Self-update a running firstmate and its secondmates to the latest from origin.

    7.6k GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Harness Adapters

    kunchenguid/firstmate

    Agent-only reference for firstmate harness operations. An agent skill from kunchenguid/firstmate.

    7.6k GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Secondmate Provisioning

    kunchenguid/firstmate

    Agent-only reference for persistent secondmate setup and retirement.

    7.6k GitHub stars~8.1k tokensUpdated today
    Auto-check passed
  • Stow

    kunchenguid/firstmate

    Sweep the current session for uncaptured durable knowledge, file it to disk, persist the open work records this session knows are unfiled or now wrong, and curate the home's tiered, decaying startup…

    7.6k GitHub stars~9k tokensUpdated today
    Auto-check passed

Categories

Questions about Firstmate Coding Guidelines

What does Firstmate Coding Guidelines do?

Agent-only reference for changing firstmate's shared, tracked material per AGENTS.md section 1. Firstmate Coding Guidelines is an agent skill from kunchenguid/firstmate.md section 1.

When should I use Firstmate Coding Guidelines?

Firstmate Coding Guidelines fits situations like: hygiene for new skills; repo style rules (one sentence per line; no agent co-author; shellcheck-clean bin scripts.

How do I install Firstmate Coding Guidelines in Claude Code?

Run `npx skills add kunchenguid/firstmate --skill firstmate-coding-guidelines -a claude-code`. Or copy the skill folder (.agents/skills/firstmate-coding-guidelines in kunchenguid/firstmate) into .claude/skills/firstmate-coding-guidelines in your project. Claude Code loads it when a task matches its description.

How do I install Firstmate Coding Guidelines in Codex?

Run `npx skills add kunchenguid/firstmate --skill firstmate-coding-guidelines -a codex`. Or copy the skill folder (.agents/skills/firstmate-coding-guidelines in kunchenguid/firstmate) into .agents/skills/firstmate-coding-guidelines in your project. Codex loads it when a task matches its description.

Can I use Firstmate Coding Guidelines in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add kunchenguid/firstmate --skill firstmate-coding-guidelines -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/firstmate-coding-guidelines, .gemini/skills/firstmate-coding-guidelines, .github/skills/firstmate-coding-guidelines and .opencode/skills/firstmate-coding-guidelines in your project.

What does Firstmate Coding Guidelines need to run?

SKILL.md names no scripts, command-line tools or credentials: Firstmate Coding Guidelines is instructions for the agent only.

Does Firstmate Coding Guidelines access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Firstmate Coding Guidelines safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Firstmate Coding Guidelines use?

Firstmate Coding Guidelines is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Firstmate Coding Guidelines use?

About 3.1k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Firstmate Coding Guidelines?

Skills that share tags, products or a category with Firstmate Coding Guidelines: Audit Session Metrics (centminmod/my-claude-code-setup, 2.7k stars), Talk Normal (hexiecs/talk-normal, 1.9k stars), Ponylang Prose Review (ponylang/ponylang-website, 160 stars) and Inherit Legacy Style (affaan-m/ECC, 274k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Firstmate Coding Guidelines?

kunchenguid (a GitHub user) maintains it in kunchenguid/firstmate, which has 7,622 GitHub stars. The repository holds 29 skills in this directory. The repository was last updated on October 7, 2026.

Source: kunchenguid/firstmate on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.