agentleFS
NitinJNitinJ/specforge/skills/export/SKILL.md

export

Skill4 starsChanged 2 months agoMITView on GitHub

Export a spec from the store to Google Docs. Auto-invoked when the owning session's Stop/UserPromptSubmit hook surfaces a queued export (the human clicked "Export to Google Docs" in the review UI); can also be run manually. Reads the spec HTML, creates a Google Doc via the connected Google Drive MCP, and reports the Doc link back so the dropdown shows it.

24 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use menu, import and 8 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • sasly2048Skill

    menu

    Point the user to cc-atlas's full interactive menu (dashboard, project comparison, session replay, team activity, anomalies, goals) — screens that need a real terminal.

    Also in 3 projects that use this

  • michaelenglandSkill

    import

    This skill should be used when the user wants to import an existing .pptx file into deckwright, bring in a PowerPoint that was created outside this tool, reverse-engineer a presentation for editing, or invoke /deckwright:import. Converts a .pptx into a PptxGenJS generation script so it can be edited and regenerated through the deckwright pipeline.

    Also in 3 projects that use this

  • kv0906Skill

    preview

    Render vault notes as styled HTML and open in browser. Turn markdown docs, decisions, progress reports into readable previews. Use for "/preview docs/project-a/checkout-flow.md", "/preview progress all", "/preview decide auth-approach", or when user wants to see a doc before sharing.

    Also in 3 projects that use this

  • AnthropicSkill

    search

    Search across all connected sources in one query. Trigger with "find that doc about...", "what did we decide on...", "where was the conversation about...", or when looking for a decision, document, or discussion that could live in chat, email, cloud storage, or a project tracker.

    Also in 4 projects that use this

  • GoogleSkill

    dashboard

    Configures and launches the GKE Capacity & Triage Dashboard scoped to a GCP project ID, GKE cluster name, or target ML workload ID. Uses the configure-and-launch-dashboard action and launch-workload-dashboard workflow to verify local dashboard health, discover cluster capacity, trigger live scans, and generate deep-linked URLs. Use when the user types "/dashboard", says "launch dashboard", "open dashboard", "show capacity", or "view triage dashboard" with a project, cluster, or workload. Don't use for general workload log querying or automated failure attribution (use the troubleshoot skill).

    Also in 4 projects that use this

  • MicrosoftSkill

    report

    Turn an exploration (threads, findings, charts) into a single Markdown report — note, blog post, executive summary, KPI dashboard, slide brief, or multi-section analytical report, with embedded charts.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 17 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use the spec title from the hook message for the Doc title.

    line 36
  2. Very specific:

    Use the document step 1 settled on — the flattened tree for a spec with children, htmlPath's full contents for a spec without.

    line 64
  3. Very specific:

    Create the doc with your connected Google Drive MCP's create-file tool (mcp__claude_ai_Google_Drive__create_file, or the equivalent on …

    line 69

“Common” is measured: kept by at least 6 in 10 of the 17 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

export

Export one or more specs from the store to Google Docs. The browser can't call the Drive MCP — only this session can — so the UI queues a request and the hook routes here. The hook message lists each queued spec id and title.

${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. Specs live at ~/.specforge/specs/<id>/spec.html.

1. Locate the spec file

For each queued spec id:

node "${CLAUDE_PLUGIN_ROOT}/lib/specforge-cli.mjs" comments <id> --all

prints { specId, htmlPath, ... } (--all because this flow wants the full comment history; the default payload is batch-scoped to pending threads). htmlPath is the on-disk spec (clean content — the review layer is injected only at serve time, so the file is plain house HTML). Use the spec title from the hook message for the Doc title.

A spec with child specs exports as one flat document, not as its root alone. A Doc has no folder, so a recipient given only the parent gets a document with holes in it and no way to tell how much is missing. Ask the daemon for the flattened tree instead of reading htmlPath:

curl -s "http://127.0.0.1:4180/spec/<id>?flat=1"

That is the root's document with every descendant appended, each in its own section, section ids namespaced so the anchors inside it still resolve. Check first with curl -s "http://127.0.0.1:4180/api/spec/<id>/children", and use htmlPath unchanged when the list is empty, which is every spec written before child specs existed.

2. Mark it in-progress

So the dropdown shows "Exporting…" (the hook already does this when it routes here; do it explicitly for a manual run):

node "${CLAUDE_PLUGIN_ROOT}/lib/specforge-cli.mjs" export-working <id>

3. Create the Google Doc via the Drive MCP

Use the document step 1 settled on — the flattened tree for a spec with children, htmlPath's full contents for a spec without. Reading htmlPath here regardless is the mistake this sentence exists to prevent: it makes a Doc of the root alone, which is exactly the document with holes in it that step 1 is about.

Create the doc with your connected Google Drive MCP's create-file tool (mcp__claude_ai_Google_Drive__create_file, or the equivalent on whatever Drive MCP is connected):

  • title: the spec title
  • textContent: the full spec HTML
  • contentMimeType: text/html

Drive converts HTML → a Google Doc (headings, lists, tables, bold/links survive; the rich CSS/charts/<script> are dropped — this is a structural export). The response carries mimeType and viewUrl.

Verify the conversion: the response mimeType must be application/vnd.google-apps.document. If it isn't (the upload stayed an .html file), delete nothing — instead re-create with the body text extracted to plain text and contentMimeType: text/plain (always converts to a Doc, just unstyled).

The shareable link is the response's viewUrl (shape: https://docs.google.com/document/d/<fileId>/edit).

4. Report the link back

node "${CLAUDE_PLUGIN_ROOT}/lib/specforge-cli.mjs" export-done <id> --url "<viewUrl>"

On any failure (MCP not connected, auth, conversion both ways failed):

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

The dropdown shows the Open Google Doc link (or the error) on its next poll.

5. Report

Briefly tell the human: which spec(s) exported and the Doc link(s).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.