$ emrebener
home personal-projects sublime-skills

Sublime-Skills

published: updated: type: build

Sublime-Skills is a public set of 33 skills for AI coding agents, in five families, with about 2,000 lines of shell and Python behind them that check what the agents write. A skill is a packaged set of instructions an agent loads for one kind of task. These cover running a feature from requirements to merged code, giving an agent a project’s conventions as files, keeping architecture decision records current, guarding destructive git commands, and working through a backlog of GitHub issues unattended.

A handful of principles for working with coding agents run through all of it. Context lives in files the agent is pointed at, not in a chat history. Review happens in a fresh context, by a subagent that didn’t write the thing it reviews. Whatever an agent writes to a fixed format is checked by a script. People approve at named gates. And an agent is allowed to come back with nothing.

1. Five families, written for any harness

FamilySkillsWhat it’s for
Spec-driven development16One feature, end to end: requirements, spec, review, ADRs, plan, implementation, testing, finishing
Project bootstrap9One-time setup and later audits of a project’s convention files
Agile, with the Ralph loop4Driving development off GitHub issues grouped into milestones
Workflow3A git guard, a readiness audit, a handoff generator
Engineering1Architecture review

The skills are written for any agent harness (the program that runs a model with tools, such as Claude Code or Codex CLI), not for one. The repository’s own authoring rule is to describe runtime mechanisms neutrally: “the harness’s interactive question tool”, “dispatch a fresh subagent”, never a specific product’s tool name. That’s what lets the same skills run under two harnesses, which the loop wrappers in section 6 do.

2. A project’s conventions as files an agent can find

An agent that starts cold in a repository guesses at its conventions. The bootstrap family replaces the guessing with seven documents and one config file that says where they are.

A coordinator skill walks through the artifacts in a fixed order: constitution (the project’s hard rules), architecture, testing, glossary, domain model, design system, and the agent’s memory file. For each one it detects what exists, asks whether to skip, extend or replace it, and loads a discovering skill that scans the code, holds the conversation and writes the file. An opt-in suggestion pass flags anti-patterns and missing-but-usually-valuable patterns, each cited from evidence in the repository.

The result is a config file every later skill reads. This is the one in this site’s own repository, which was bootstrapped with these skills:

context:
  constitution_path: docs/CONSTITUTION.md       # project-wide principles (MUST/SHALL rules)
  architecture_path: docs/ARCHITECTURE.md       # system structure overview
  testing_path: docs/TESTING.md                 # test strategy (frameworks, fixtures, coverage)
  glossary_path: docs/GLOSSARY.md               # canonical domain vocabulary
  domain_path: docs/DOMAIN.md                   # conceptual entities and relationships
  design_path: docs/DESIGN.md                   # visual design system (colors, type, spacing, components)

Skills never search for these files. A discovery script reads the config, with a local overlay file on top, and prints the resolved paths as JSON. There’s no fallback search on purpose: a null means the project doesn’t have that artifact, and a skill that would have silently picked up the wrong file gets nothing instead.

Documents written once go stale, so two things watch them. A coherence check runs structural tests across the artifacts: pointers that don’t resolve, vocabulary used in the domain model and missing from the glossary, architecture components with no testing coverage, constitution rules whose evidence file is gone. An auditing skill re-runs the discovery skills against an already-bootstrapped project and commits stage by stage, so some changes can be accepted and others declined.

3. Spec-driven development as a chain of small skills

One coordinator skill is the only entry point, and it’s a thin state machine over twelve stages:

preflight -> discover -> spec -> spec review -> ADRs -> spec approval
  -> plan -> settle branch -> per-task implementation + final review
  -> optional feature testing -> optional memory file -> finish

The split into sixteen skills follows one rule about context. Stages where the agent talks with me (discovering requirements, writing the spec) are loaded inline, because the conversation is the input. Stages that should judge the work without having produced it (spec review, ADR maintenance, each implementation task, the final review, testing) are dispatched as subagents with a fresh context. The reviewer then sees the spec the way a later reader would, without the conversation that produced it.

Between stages, a gitignored state file carries the data: paths, decisions flagged for ADRs, the current stage. It has a JSON schema, and updates happen at stage boundaries, never mid-stage.

Every artifact a writer skill produces is checked by a script before it’s committed. The spec validator looks for the required sections, at least one numbered requirement and success criterion, duplicate IDs, placeholders and forbidden diagram syntax:

REQUIRED_SECTIONS=(
  "^# Spec:"
  "^## Goal"
  "^## User Stories"
  "^## Functional Requirements"
  "^## Success Criteria"
  "^## Edge Cases"
  "^## Assumptions"
  "^## Out-of-Scope"
)

for pattern in "${REQUIRED_SECTIONS[@]}"; do
  if ! grep -qE "$pattern" "$SPEC"; then
    # ...
    report_critical "missing required section matching: $pattern"
  fi
done

# 2. At least one Functional Requirement (FR-NNN) and one Success Criterion (SC-NNN)
if ! grep -qE "FR-[0-9]{3}" "$SPEC"; then
  report_critical "no FR-### functional requirement IDs found"
fi

An instruction to include these sections can be missed, and a failing exit code can’t. The same pattern covers plans and the config file, where the bootstrap coordinator runs the validator in a fix-and-retry loop until it passes.

The coordinator also has a rule about what it doesn’t do. It never tests the feature itself. If the tester subagent reports that its tools are unavailable, the coordinator hands me a manual test plan instead of improvising a test.

4. Architecture decision records, maintained by the agent

After a spec is reviewed, a subagent reads it alongside every existing ADR and decides whether anything in it deserves a new record. The skill’s test for that is four conditions, all of which have to hold:

  • the decision is architectural: structure, technology, data flow, security model, deployment, persistence or boundary placement;
  • a real alternative existed;
  • the reasoning isn’t self-evident from the code or the spec;
  • no existing ADR already captures it.

The line the skill draws is that a decision is ADR-worthy when a future engineer would re-litigate it without context, where the reason matters more than the outcome.

Two instructions in it do most of the work. The first is that returning zero ADRs is a normal and common outcome, with the words “Don’t manufacture ADRs to look productive.” The skill makes an empty result explicitly acceptable. The second is a locked format (status, date, spec link, context, decision, consequences, alternatives considered), with the next number always the highest existing one plus one and supersession marked explicitly, so records written months apart by different sessions read as one series.

This site’s nine ADRs use that format.

5. The git guard: an instruction and an optional hook

The git guard is a baseline policy against destructive git operations without explicit authorisation: push, reset --hard, clean -f, branch -D, checkout . and restore .. As a skill, it works by instruction. The agent commits to asking before any irreversible operation, naming the exact command and its consequence in each ask.

An instruction is a request, though, so the skill bundles a reference hook for Claude Code, for anyone who wants enforcement at the harness level. It runs before a shell command executes and refuses the ones that match:

DANGEROUS_PATTERNS=(
  "git\s+push"
  "git\s+reset\s+--hard"
  "git\s+clean\s+-[A-Za-z]*f"
  "git\s+branch\s+-D"
  "git\s+branch\s+(-d\s+)?--delete\s+--force"
  "git\s+checkout\s+\."
  "git\s+restore\s+\."
)

for pattern in "${DANGEROUS_PATTERNS[@]}"; do
  if echo "$COMMAND" | grep -qE "$pattern"; then
    echo "BLOCKED: '$COMMAND' matches dangerous pattern '$pattern'. The user has prevented you from doing this." >&2
    exit 2
  fi
done

The script also refuses everything if jq, which it needs to read the command, isn’t installed, so a missing dependency blocks commands instead of letting them through.

A separate audit skill is the read-only counterpart: it verifies the install, the repository state and the project’s bootstrap state, and reports without changing anything.

6. The Ralph loop

A Ralph loop re-runs a coding agent on the same prompt, each time in a fresh session, until the work is done. Here the work is a backlog of GitHub issues grouped into milestones that act as sprints.

Each invocation does exactly one issue. A coordinator skill picks the lowest-numbered open milestone, chooses the next issue from it, dispatches an implementer subagent and then a polisher, merges locally, and closes the issue. It runs with no approval pauses, never opens a pull request and never pushes. Then the session ends. The next invocation starts from the repository and the issue tracker, not from a long conversation.

The wrapper script decides whether to go again by reading a marker the skill prints at the end of its output:

state=$(ralph_extract_state)

case "$state" in
  continue)
    # ...
    ralph_print "Iteration $i complete. Continuing to next."
    ;;
  all-done)
    ralph_print "All milestones closed. Ralph loop done."
    final_state="all-done"
    break
    ;;
  stuck)
    ralph_print "Current milestone is stuck. Human attention needed."
    ralph_print "Resolve the dependency graph, then re-run this script."
    final_state="stuck"
    break
    ;;
  # ...
  "")
    ralph_print "No RALPH_EXIT marker found in output. Bailing for safety."
    # ...
    final_state="no-marker"
    break
    ;;
esac

An unattended loop needs to stop for the right reasons, so the wrapper stops on anything it doesn’t recognise. A missing marker ends the loop, an unknown one ends it, and a default cap of 20 iterations ends it even if every iteration reports progress. “Stuck” is a first-class outcome: when the remaining issues in a milestone are blocked on each other, the skill says why and the loop hands the problem back to me.

There are two wrappers over one shared script, one for Claude Code and one for Codex CLI. The Codex wrapper takes the whole command as an argument, so the model and reasoning effort can change per run. Either can show a small terminal dashboard, a curses program fed by the loop’s event stream.