Skip to content
Skills Library
Programming · Conversion & formats

export-md

/export-md

Export a spec from the store as a GitHub-flavoured markdown file, plus a sidecar directory holding its diagrams. Use when the user asks to "export this spec as markdown", "give me the .md", "put this spec in the repo", or wants a spec on a surface that speaks markdown (GitHub, an editor, another agent). The conversion is deterministic and needs no model: this skill picks the spec, runs the CLI, and reports where the file landed.

Repository
specforge ↗
Licence
MIT
Last repository change
23.09.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 23.09.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Export a spec from the store as a GitHub-flavoured markdown file, plus a sidecar directory holding its diagrams. Use when the user asks to "export this spec as markdown", "give me the .md", "put this spec in the repo", or wants a spec on a surface that speaks markdown (GitHub, an editor, another agent). The conversion is deterministic and needs no model: this skill picks the spec, runs the CLI, and reports where the file landed.

Triggers from the description

export this spec as markdowngive me the .mdput this spec in the repo
Original author description

Export a spec from the store as a GitHub-flavoured markdown file, plus a sidecar directory holding its diagrams. Use when the user asks to "export this spec as markdown", "give me the .md", "put this spec in the repo", or wants a spec on a surface that speaks markdown (GitHub, an editor, another agent). The conversion is deterministic and needs no model: this skill picks the spec, runs the CLI, and reports where the file landed.

How it works

  1. 1. Pick the spec
  2. 2. Export
  3. 3. Report
  4. Notes
Original SKILL.md headings · 79 lines, 566 words
SKILL.md preview
---
name: export-md
user-invocable: true
description: |
  Export a spec from the store as a GitHub-flavoured markdown file, plus a
  sidecar directory holding its diagrams. Use when the user asks to "export this
  spec as markdown", "give me the .md", "put this spec in the repo", or wants a
  spec on a surface that speaks markdown (GitHub, an editor, another agent). The
  conversion is deterministic and needs no model: this skill picks the spec,
  runs the CLI, and reports where the file landed.
allowed-tools: Read, Bash, Glob
---

# export-md

Render a store spec as markdown. `${CLAUDE_PLUGIN_ROOT}` below denotes the
installed plugin directory. Claude and Pi export it; Codex provides the exact
value in SpecForge SessionStart context. Substitute it in every shell command.

## 1. Pick the spec

A store id is exactly one of:

- ten lowercase hex characters, `[0-9a-f]{10}` (it is `sha1(uuid)[:10]`), or
- `template-` followed by one of `general`, `design`, `research`, `design-impl`,
  `impl`, `deck` — that list and nothing else.

**Check `$ARGUMENTS` against those two forms before it goes anywhere near a
shell.** The enumeration is the point: `template-<anything>` would let
`template-$(id)` through as identifier-shaped. Anything that does not match is
not an id, whatever it looks like. Treat it as a description and find the real id
with

```
node "${CLAUDE_PLUGIN_ROOT}/lib/specforge-cli.mjs" list
```

which is also what to run when `$ARGUMENTS` names no spec at all. List, then ask
which one, unless exactly one spec is attached to this session.

## 2. Export

```
node "${CLAUDE_PLUGIN_ROOT}/lib/specforge-cli.mjs" export-md "<id>" [--out "<dir|file.md>"]
```

`--out` takes a directory (the file is named from the spec title) or a path
ending in `.md`. Omitted, it writes into the current directory.

**Both placeholders are filled from what the human typed, so treat them as data.**
Quote them, as above: a destination with a space in it otherwise arrives as two
arguments and the export lands somewhere else.

Quoting is not sanitising. Double quotes stop word splitting but NOT substitution,
so `$`, a backtick, `;`, `|`, `&` or a newline still run inside them.

**If either placeholder carries one of those characters, do not paste it into the
command.** For the id that cannot happen once step 1's check has run, which is why
that check is a closed enumeration rather than a warning. For the path, ask for a
plain one, or write to a directory you choose and tell the human where it went.
The CLI validates its arguments, but only after the shell has had its turn.

It prints `{ id, mdPath, assetsDir, assets, warnings }`:

- **`assetsDir`** is set when the spec has diagrams. They are written next to the
  `.md` as SVG files and referenced as ordinary images, because every markdown
  renderer strips inline SVG. **The folder has to travel with the file** — a `.md`
  moved on its own keeps its links but loses the pictures.
- **`warnings`** names anything the conversion could not carry faithfully (a
  table cell that held a list, an element with no markdown form). Empty is the
  normal case; if it is not empty, say what it says.

A `deck` spec exits non-zero: slides are not a linear document, and flattening
them is not something this does.

## 3. Report

Give the human the path, and mention the assets folder when there is one. Do not
paste the markdown into the conversation: the file is the deliverable, and a spec
is long.

## Notes

- Nothing is written into the store. The markdown is a rendering of `spec.html`
  at the moment you asked, so re-exporting after an edit is how you refresh it;
  there is no stale copy to invalidate.
- The reverse direction is the convert command — `/specforge:convert <file.md>`
  under Claude Code, `/spec-convert <file.md>` under Pi — which imports markdown
  as a **new** spec and never writes over an existing one. Name the one your
  harness registers; the other does not exist there.

Versions

The database has no other skills named export-md.

Database snapshot: 13.11.2026 · package version 63ccd3befddc (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 95compiler
    Use when converting a refined markdown E2E test case into a standard Playwright .spec.ts file. Triggers on "compile this test", "convert to playwright", or "generate spec from markdown". Requires a stable markdown test case and a running dev server.
  • 100convert-spec
    Convert an existing design/spec file into a SpecForge spec in the store. Use when the user asks to "convert <file> to a spec", "import this design doc", or "turn this markdown/HTML into a SpecForge spec". Handles two cases: an existing SpecForge-style .html is ingested as-is; a…
  • 100software-spec
    Ingest a software specification written in the Good Software Specification Format (GSSF). A GSSF specification package is a directory named `<name>-gssf` containing a top-level Markdown specification document `<name>.md` (e.g. foo-gssf/foo.md) plus zero or more auxiliary files…
  • 95migrate-spec
    Move one existing spec onto the SpecForge component library. Use when the user asks to "migrate <spec> to the component library", "put this spec on the new components", or "adopt the design system in <spec>". Runs the deterministic renames in code, reads the callouts that carry…
  • 82ase-sync-export
    Export the SpecBook-based specification (SPEC) into ready-to-consume renderings like HTML, PDF, normalized Markdown, or JSON. Use when the user wants to "export", "render", or "materialize" the specification.
  • 90create-tech-spec
    Create a technical spec from a GitHub issue in this repository by applying the shared `write-tech-spec` workflow with Oz-specific issue context and output paths. Use when an issue should be turned into a tech spec artifact stored under `specs/GH<issue-number>/tech.md` and the…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.