Skip to content
Agentmart
Submit a tool

tune-templates

Optimize the SpecForge spec templates from the review-comment history.

Skill by NitinJ

IndexedMIT★ 5
Write a review

Chalk Labs

Need help deploying tune-templates?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/nitinj-tune-templates

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Optimize the SpecForge spec templates from the review-comment history. Use when the user asks to "tune the templates", "improve the spec templates", "bake review learnings into the templates", or after a batch of specs has accumulated feedback. Mines every human comment across the store, clusters the recurring cross-spec themes + redundant sections, proposes template changes as a spec, and — only on the user's go-ahead — edits the template specs in place, one per spec type. Never touches or rewrites existing specs; templates only.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md and code. Checked Nov 1, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/tune-templates

Tools it pre-approves 6

From allowed-tools in SKILL.md: the agent may use these without asking you each time.

  • Read,
  • Write,
  • Edit,
  • Bash,
  • Glob,
  • Grep

What's inside

Skill name
tune-templates
Description
Optimize the SpecForge spec templates from the review-comment history. Use when the user asks to "tune the templates", "improve the spec templates", "bake review learnings into the templates", or after a batch of specs has accumulated feedback. Mines every human comment across the store, clusters the recurring cross-spec themes + redundant sections, proposes template changes as a spec, and — only on the user's go-ahead — edits the template specs in place, one per spec type. Never touches or rewrites existing specs; templates only.
License
MIT
Allowed tools
Read,, Write,, Edit,, Bash,, Glob,, Grep
Instructions
103 lines in SKILL.md · view on GitHub

Before installing

  • Pre-approves some shell commands

Files (1)

  • SKILL.md

SKILL.md (first lines)

# tune-templates

Turn the review-comment history into better templates. The templates are the
per-type spec shells, one `template-<type>` per kind of spec, stored — and
edited — as ordinary specs. Editing a template spec changes what every future
spec of that type scaffolds from.

**Read the list at run time, never from memory:**

```
node "${CLAUDE_PLUGIN_ROOT}/lib/spec-types-cli.mjs"
```

Six kinds ship with the plugin and the user can add more from the configuration
page, so the list is not knowable when this file is written. Enumerating it here
is how a type gets silently skipped.

`template-general` is deliberately section-free: tune its chrome and its authoring
comment, never add sections to it.

`${CLAUDE_PLUGIN_ROOT}` below denotes the installed plugin directory. Claude and
Pi export it; Codex provides the exact value in SpecForge SessionStart context.
Substitute that value in every path and shell command. Templates live in the
store at `~/.specforge/specs/template-<type>/spec.html`; the bundled seeds are at
`${CLAUDE_PLUGIN_ROOT}/templates/spec-base-<type>.html` (fallback + fresh-install).

**Scope rule (non-negotiable):** this skill edits templates only. It never touches,
rewrites, or lints existing specs. The recurring themes become template scaffolding,
not retroactive edits.

## 1. Learn — mine the comment corpus

```
node "${CLAUDE_PLUGIN_ROOT}/lib/mine-comments.mjs" --json
```

Every human-authored comment across the store, keyed to its spec (title/type) and
the section it anchored to. Agent replies are excluded. Cluster them into recurring
**cross-spec** themes — weight spread (how many distinct specs carry a theme) over
raw count, because the goal is to bake in what comes up "again and again across many
specs", not one loud spec. Also look for **redundant sections**: shapes the templates
scaffold that the human keeps deleting or collapsing.

The canonical first run of this analysis is spec `cbc766178e` ("Template Learnings —
What 588 Review Comments Teach Us") — read it for the 13 themes (T1..T13) and the
structural defects already found. On a re-run, diff new themes against it.

## 2. Propose — discuss via a spec, never edit silently

Author the proposal as a **research** spec (via the create-spec flow), one theme to
one concrete template change, with an evidence index back to the comments. Present:

- the ranked themes (spread + representative quotes),
- redundant / missing sections per template,
- the exact change proposed for each template the command above lists, the user's
  own types included (a kind added from the configuration page appears there
  without this file changing). For `template-general` the proposal covers chrome
  and the authoring comment only, since adding sections to it would defeat the
  type,
- open questions the user must decide.

Attach it and **wait for the user's decisions**. Do not proceed to §3 until they
have reacted. This mirrors how `cbc766178e` was reviewed.

## 3. Apply — edit the template specs in place

Only on the user's go-ahead, and only for the changes they approved:

1. Edit `~/.specforge/specs/template-<type>/spec.html` with the Edit tool. Keep every
   `<section id="…">` and its id, the theme CSS, the palette tokens, and the floating
   TOC (update TOC entries + section numbers together). Follow the house rules the
   themes encode: lead with the number, prefer tables/cards/diagrams over prose,
   crisp headings with no flair, present the number then explain.
   Template prose sets the register for every spec written from it, so it is held
   to the language contract twice over:
   `${CLAUDE_PLUGIN_ROOT}/references/spec-language.md`. A placeholder that models
   an aphorism, an em dash or a hedge teaches every future spec to copy it.
2. Lint each edited template — must pass:
   ```
   node "${CLAUDE_PLUGIN_ROOT}/lib/lint-spec.mjs" "~/.specforge/specs/template-<type>/spec.html"
   ```
3. Sync the bundled seed so fresh installs match: mirror the finalized template into
   `${CLAUDE_PLUGIN_ROOT}/templates/spec-base-<type>.html` (a per-type seed wins over
   the shared doc/impl shell — see `lib/store-templates.mjs` `bundledShell`).
4. Restart the daemon so the running server serves the edited templates:
   ```
   node "${CLAUDE_PLUGIN_ROOT}/lib/specforge-cli.mjs" start
   ```

`ensureTemplates` never overwrites an existing store template, so edits survive a
reseed. Templates are protected from deletion; they stay attachable so they can be
reviewed and tuned exactly like this.

## 4. Guard — commentability advisory

The lint carries an advisory `commentability` check (T7): it warns, without failing,
when a spec traps text directly inside a bare `<div>` that the review layer cannot
anchor a comment to. It is advisory at authoring time and **never edits a spec** —
the fix is to wrap trapped text in a `<p>`/`<li>` or a commentable
`.card`/`.panel`/`.stat`/`.callout`. When authoring or tuning, aim for a clean
`commentability` line.

From NitinJ/specforge, MIT.

Signals

Stars
5
Forks
0
Open issues
1
Last commit (this folder)
Sep 8, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from NitinJ

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get tune-templates running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying tune-templates?

CallGet help
Cite this page

tune-templates skill. Agent Mart. https://agentmart.dev/skills/nitinj-tune-templates (last updated 2026-10-24)