Skip to content
Agentmart
Submit a tool

generate-template

Write a spec template from a prompt.

Skill by NitinJ

IndexedMIT★ 5
Write a review

Chalk Labs

Need help deploying generate-template?

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-generate-template

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

Write a spec template from a prompt. Auto-invoked when the owning session's Stop/UserPromptSubmit hook surfaces a queued template generation (the human clicked "Add a template" on the configuration page). Turns their description of the sections and when the kind should be used into the template spec's HTML, lints it, and reports back. The human is watching a dialog until this finishes.

Use cases: frontend, writing, agent-building

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/generate-template

Tools it pre-approves 4

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

  • Read,
  • Write,
  • Edit,
  • Bash

What's inside

Skill name
generate-template
Description
Write a spec template from a prompt. Auto-invoked when the owning session's Stop/UserPromptSubmit hook surfaces a queued template generation (the human clicked "Add a template" on the configuration page). Turns their description of the sections and when the kind should be used into the template spec's HTML, lints it, and reports back. The human is watching a dialog until this finishes.
License
MIT
Allowed tools
Read,, Write,, Edit,, Bash
Instructions
115 lines in SKILL.md · view on GitHub

Before installing

  • Pre-approves any shell command

Files (1)

  • SKILL.md

SKILL.md (first lines)

# generate-template

The human named a new kind of spec and described it in one prompt. A template
spec already exists at `~/.specforge/specs/template-<slug>/spec.html`, holding
the bundled shell for its family. **Your job is to replace that shell's sections
with the ones the prompt describes**, keeping everything the shell owns.

`${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.

**Someone is waiting on a dialog with a stated ETA.** Do this now, in one pass,
and report back. A template that is roughly right and arrives is worth more than
one that is exactly right and does not: the human's next move is to comment on
the sections and refine them, which is the whole point of landing them on a spec
page.

## 1. Read the request

The hook message lists each template spec **id** and the **prompt**. To read it
again, or for a manual run:

```
node "${CLAUDE_PLUGIN_ROOT}/lib/spec-nav-cli.mjs" map --spec ~/.specforge/specs/<id>/spec.html
```

The prompt is on the spec's meta at `~/.specforge/specs/<id>/meta.json` under
`generate.prompt`. It describes three things, though rarely in this order:

- **the sections** the kind should have
- **when the kind should be used** (this is already stored on the kind's
  registry row; the prompt is where it came from)
- **the name**, which is already the slug and needs nothing from you

## 2. Read the shell you are editing

```
node "${CLAUDE_PLUGIN_ROOT}/lib/spec-nav-cli.mjs" map --spec ~/.specforge/specs/<id>/spec.html
```

The shell is one of two families and the choice is already made:

- **doc** — chrome, a TL;DR, and prose sections. No plan machinery.
- **impl** — the same plus `impl-plan`, `task-tracker` and the Runtime stubs.

**Do not change the family.** If the prompt asks for stages and the shell has
none, add ordinary sections for them rather than reaching for the plan markup;
the human chose the family on the form and can change it by asking.

## 3. Write the sections

Replace the shell's placeholder sections with the ones the prompt describes.
Keep, without exception:

- everything in `<head>`: the title, the theme CSS, the component library block
- `<nav class="toc">`, with its links rewritten to match your sections
- one `<section id="...">` per section, each id **stable, unique and lowercase**
  (anchors and comments key off them)
- the canonical palette tokens. Colour only through them; the lint enforces it
- the `{{ … }}` placeholder convention **inside** each section, because this is a
  template: a section's body describes what an author should write there, in the
  same voice the existing templates use

Rules for the sections themselves:

- **One section per distinct thing the prompt names.** Do not merge two into one
  because they are short, and do not invent a third because the shell had one.
- **Order them the way the document is read**, not the way the prompt listed
  them. A summary goes first whatever position it was mentioned in.
- **Give each a one-line `<p class="sub">`** saying what belongs in it. This is
  what an authoring agent reads.
- Prose you write follows the language contract at
  `${CLAUDE_PLUGIN_ROOT}/references/spec-language.md`: no em dashes, no
  aphorisms, no hedged decisions, every sentence carrying something.

If the prompt is vague about a section, write the section anyway with a
placeholder saying what it is for. An absent section is invisible; a thin one
gets commented on and fixed.

## 4. Lint before reporting

```
node "${CLAUDE_PLUGIN_ROOT}/lib/lint-spec.mjs" ~/.specforge/specs/<id>/spec.html --project "${CLAUDE_PLUGIN_ROOT}"
```

Fix and re-run until `PASS`. **Do not report a template that fails the lint**:
every spec created from it inherits the failure. The `spec-language` line is
advisory and never fails the lint; clear what it names anyway.

## 5. Report back

```
node "${CLAUDE_PLUGIN_ROOT}/lib/specforge-cli.mjs" template-done <id>
```

The dialog the human is watching navigates them to the template the moment this
lands.

If it genuinely cannot be written (the prompt describes no sections at all, the
shell is unreadable, the lint cannot be cleared):

```
node "${CLAUDE_PLUGIN_ROOT}/lib/specforge-cli.mjs" template-done <id> --error "<short reason>"
```

The dialog shows the reason and offers to open the template anyway, which is
still the working shell it started as. **Always report one or the other.**
Reporting nothing leaves the human on a spinner until it times out.

## 6. Tell the human

One or two lines: which kind you wrote, and the sections you chose. They are
about to read it.

From NitinJ/specforge, MIT.

More from NitinJ/specforge

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 generate-template 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 generate-template?

CallGet help
Cite this page

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