Agent skill

Spec Init

by legeling in legeling/PromptHub

按风险编写和维护项目规范,保留有效功能约定与关键决策。用于明确要求整理 spec、补齐项目文档、更新需求设计或迁移旧文档流程;普通代码修改不自动启动完整文档流程。

AGPL-3.0Auto-check passed

Install Spec Init

skills CLI
$ npx skills add legeling/PromptHub --skill spec-init -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install legeling/PromptHub spec-init --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/legeling/PromptHub.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/spec-init .claude/skills/spec-init && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
spec-init
GitHub stars
1.7k
Token cost
~645 tokens
SKILL.md length
97 words
Files
20 (incl. scripts, references, assets)
Skills in repo
2
Repo updated
First seen
Licence
AGPL-3.0

At a glance

按风险编写和维护项目规范,保留有效功能约定与关键决策。用于明确要求整理 spec、补齐项目文档、更新需求设计或迁移旧文档流程;普通代码修改不自动启动完整文档流程。

  • Works in 4 steps: 定向读取。… → 明确必要信息。… → 进入实施。… → …
  • SKILL.md covers 先确定本轮需要多少文档, 执行流程, 需求文档是唯一真源 and 保留验证,减少重复登记, plus 3 more sections

What it does

Spec Init is an agent skill from legeling/PromptHub. 按风险编写和维护项目规范,保留有效功能约定与关键决策。用于明确要求整理 spec、补齐项目文档、更新需求设计或迁移旧文档流程;普通代码修改不自动启动完整文档流程。

Its SKILL.md is about 650 tokens, which your agent loads only when the skill is triggered. The skill folder holds 29 other files, including scripts, reference files and assets (for example `agents/openai.yaml`, `examples/demo-app/AGENTS.md` and `examples/demo-app/README.md`).

The repository describes itself as: 一款包含了 Prompt管理,Skill管理,Agent管理的一站式AI工具箱,助你高效管理提示词,一键分发skills ,一站式管理Agent资产,并实现云同步,备份,版本管理 | An all-in-one AI toolbox for prompt, agent, and skills management. Reuse prompts…. The licence is AGPL-3.0.

Example prompts

  • “/spec-init”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. 定向读取。 先看项目指令、README、相关代码与测试;有文档入口就据此定位本任务的有效约定。没有入口时按功能搜索,确认文件状态,不补全项目文档目录。参考资料按下方触发条件读取,不默认全部加载。
  2. 明确必要信息。 回答“要改成什么、影响什么、如何验证”。从现有代码、测试和已确认决策解决常规选择;只澄清会实质影响范围、安全、数据或兼容性的未知项。未确定方案不能写成已确认事实。
  3. 进入实施。 上述信息充分且无关键阻塞就开工。缺编号、历史索引、无关文档或一般格式不阻塞实现。源码、测试、配置、迁移与受影响文档形成一个完整批次,再统一执行必要检查。
  4. 校准结果。 核实行为与约定,记录实际验证和剩余风险;仅同步本次主题的权威文档、相关引用和实施状态。未跑测试、未上线或未完成迁移不能写成通过或已交付。

What it can do on your machine

Read from SKILL.md and the folder at commit 5439436. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/, which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Spec Init loads about 645 tokens when it runs, and up to ~2.2k if it reads all its reference files. Until then it costs about 23 tokens; SKILL.md has 97 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~23
When it runs · the whole SKILL.md, loaded when a task matches
~645
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from legeling/PromptHub at commit 5439436, republished under its AGPL-3.0 licence (© legeling). 97 words, ~645 tokens.

Download SKILL.mdSave it as .claude/skills/spec-init/SKILL.md (or your agent's skills folder). This skill also uses 19 other files; get the full folder from GitHub.
name
spec-init
description
按风险编写和维护项目规范,保留有效功能约定与关键决策。用于明确要求整理 spec、补齐项目文档、更新需求设计或迁移旧文档流程;普通代码修改不自动启动完整文档流程。

spec-init

帮助项目保留足以指导开发的有效约定,让文档投入与当前任务的风险相称。 用户要求实施时,推进到实现和验证;用户只要求分析或方案时,交付分析或方案。

先确定本轮需要多少文档

请求最小准备文档投入
小修复、局部调整、普通重构问题、范围、验证办法已明确不新建需求、计划或 change;已有说明失真时原位更新
普通功能目标、非目标、验收条件清楚更新已有功能文档;独立新主题才新建一份
跨会话或多人实施上述内容和剩余工作可交接按需保留一份活动计划,同一目标继续更新原计划
权限、数据迁移、公共契约、不可逆操作等高风险变化关键决策、失败路径、兼容和恢复办法清楚在相关文档补必要设计与验证;重大取舍才独立记录
明确要求完整需求或设计覆盖用户指定范围按需要展开角色、异常流、契约和质量目标,不自动铺满目录

小改动也可能高风险,按影响判断,不按代码行数判断。 若没有需要改变的约定,零文档改动是正常结果。

执行流程

  1. 定向读取。 先看项目指令、README、相关代码与测试;有文档入口就据此定位本任务的有效约定。没有入口时按功能搜索,确认文件状态,不补全项目文档目录。参考资料按下方触发条件读取,不默认全部加载。
  2. 明确必要信息。 回答“要改成什么、影响什么、如何验证”。从现有代码、测试和已确认决策解决常规选择;只澄清会实质影响范围、安全、数据或兼容性的未知项。未确定方案不能写成已确认事实。
  3. 进入实施。 上述信息充分且无关键阻塞就开工。缺编号、历史索引、无关文档或一般格式不阻塞实现。源码、测试、配置、迁移与受影响文档形成一个完整批次,再统一执行必要检查。
  4. 校准结果。 核实行为与约定,记录实际验证和剩余风险;仅同步本次主题的权威文档、相关引用和实施状态。未跑测试、未上线或未完成迁移不能写成通过或已交付。

停止扩写的条件:当前任务能够安全实施、能够验收,必要约定已经明确。 不要为“更完整”补无关背景、示例、测试矩阵或未来功能;不要在每个局部修改后扫描所有文档。

需求文档是唯一真源

每个主题指定一份权威文档,保存最新确认的需求、边界和验收;沿用原路径,由已有文档入口指向它。唯一真源不等于全项目只能有一个文件。 用户确认需求变化后,立即原位替换权威文档中的旧要求与验收,不只追加补充说明,不等实现完成才更新,也不另建“新版需求”。尚未确认的提议不能替换已确认需求。 需求与交付状态分开:新需求立即生效,未完成的实现标注“待实施”;必要时注明当前实现差距,不能把旧实现描述成仍然有效的要求,也不能把新需求写成已交付。

围绕本次变更的主题、术语和旧规则,定向检查相关现行文档,包括 README、AGENTS、设计和计划。权威文档以外的需求和验收副本改为链接,不重新抄写新规则;设计只记录实现方案或差距。修订只改受影响内容,保留原有命令和其他无关信息,不能只改一份而让另一份旧规则继续生效。 活动计划只记实施动作、进度和阻塞,并引用权威需求,不再保存另一套需求定义。需求变化时撤下失效待办,完成或被替代后移出活动入口。 历史仅用于追溯,由历史正文或入口明确其已失效及现行文档,不作为执行依据;普通编辑历史交给 Git。无需重写所有历史或全仓库扫文档。

用户最新明确决定用于更新权威文档;代码和测试用于核实实现状态,不能覆盖已确认需求。若无法判定哪份文档权威或哪项决定已确认,只澄清影响本次工作的关键冲突。 交付前确认本次主题没有冲突的现行说法,验收与最新需求一致,实施状态真实。不要用“已归档”或“已更新计划”代替纠正仍生效的旧规则。

保留验证,减少重复登记

验收条件直接关联真实测试路径、命令或人工验收步骤。已有 API schema、配置说明和测试资产优先引用,不重复转抄。 日常开发不强制 FR / DES / TEST / T 编号或手工覆盖矩阵;项目明确需要追踪体系时保留已有 ID,只维护本任务涉及的关系。 测试策略、测试标准、用例、回归和 fixtures 不必拆成七份文档。高风险变化仍要覆盖失败、幂等或恢复路径,并如实说明未验证边界。 完成标准是目标满足、必要检查完成或限制已说明、受影响约定准确;文档数量不是门禁。

现有项目与辅助脚本

更新 Skill 不等于项目里旧的 AGENTS 或规则已经迁移。存在旧的全量文档门禁时,先辨明规则来源;仅在获准的迁移范围内改写,不能静默忽略项目规则。 迁移保持原路径和用户内容,不自动删除旧文档、清空 active、移动目录或覆盖整份 AGENTS。只替换已确认来自旧 Skill 的流程片段,保留项目特有约束。

只有用户需要空项目文档骨架时才运行 scripts/spec-init.sh;默认仅生成 README、简短 AGENTS 和文档入口。 脚手架不理解业务,跑完不能声称 spec 完成。现有项目优先人工定向更新,不用脚手架强制覆盖来迁移规则。 不要创建空需求、示例 change、规则大全或未使用目录。

按需参考

交付

说明实现或规范改变了什么、如何验证,以及剩余限制。没有改文档无需补“无变化”记录。 不以补齐规范代替已获授权的实施;不把未完成实现标成完成。

© legeling, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 19 other files (scripts, references, assets) in .agents/skills/spec-init of legeling/PromptHub.

  • SKILL.md
  • agents/openai.yaml
  • assets/templates/project/en/AGENTS.md.tmpl
  • assets/templates/project/en/README.md.tmpl
  • assets/templates/project/en/docs/README.md.tmpl
  • assets/templates/project/zh/AGENTS.md.tmpl
  • assets/templates/project/zh/README.md.tmpl
  • assets/templates/project/zh/docs/README.md.tmpl
  • examples/demo-app/AGENTS.md
  • examples/demo-app/README.md
  • examples/demo-app/docs
  • … and 9 more

Open the folder on GitHubat commit 5439436

Compare with similar skills

Spec Init next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Spec Init compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Spec Init this skilllegeling/PromptHub1.7k—~645Automated safety check: PassAGPL-3.0
Initasgeirtj/system_prompts_leaks69k—~5.5kAutomated safety check: PassCC0-1.0
Initasgeirtj/system_prompts_leaks69k—~602Automated safety check: PassCC0-1.0
Initbrycewang-stanford/Auto-Empirical-Research-Skills4.5k—~596Automated safety check: NotesCustom licence
Initpartcad/partcad503—~492Automated safety check: PassApache-2.0
Inithashgraph-online/awesome-codex-plugins1.2k—~603Automated safety check: PassApache-2.0

Similar skills

  • Init

    asgeirtj/system_prompts_leaks

    Initialize new CLAUDE.md file(s) and optional skills/hooks with codebase documentation

    69k GitHub stars~5.5k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Init

    asgeirtj/system_prompts_leaks

    Initialize a new CLAUDE.md file with codebase documentation. An agent skill from asgeirtj/system_prompts_leaks.

    69k GitHub stars~602 tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Init

    brycewang-stanford/Auto-Empirical-Research-Skills

    Fills all [FILL:] placeholders across the template to initialize a new research project.

    4.5k GitHub stars~596 tokensUpdated 2 days ago
    Auto-check: notes
  • Init

    partcad/partcad

    Initialize a PartCAD package in the current directory by running the installed PartCAD CLI (pc init / partcad init).

    503 GitHub stars~492 tokensUpdated today
    Game DevelopmentAuto-check passed
  • Init

    hashgraph-online/awesome-codex-plugins

    Set up docflow in a repo with no docs yet: scaffold the docs tree, write docflow.json, add agent guidance.

    1.2k GitHub stars~603 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Init

    TokenRollAI/llmdoc

    Explicit V3 bootstrap for repositories that do not already have valid llmdoc knowledge.

    483 GitHub stars~1.2k tokensUpdated 1 mo ago
    Auto-check passed

More from legeling/PromptHub

  • Release Sync

    legeling/PromptHub

    PromptHub release update skill. An agent skill from legeling/PromptHub.

    1.7k GitHub stars~978 tokensUpdated 9 days ago
    Auto-check passed

Questions about Spec Init

What does Spec Init do?

按风险编写和维护项目规范,保留有效功能约定与关键决策。用于明确要求整理 spec、补齐项目文档、更新需求设计或迁移旧文档流程;普通代码修改不自动启动完整文档流程。. Spec Init is an agent skill from legeling/PromptHub.

How do I install Spec Init in Claude Code?

Run `npx skills add legeling/PromptHub --skill spec-init -a claude-code`. Or copy the skill folder (.agents/skills/spec-init in legeling/PromptHub) into .claude/skills/spec-init in your project. Claude Code loads it when a task matches its description.

How do I install Spec Init in Codex?

Run `npx skills add legeling/PromptHub --skill spec-init -a codex`. Or copy the skill folder (.agents/skills/spec-init in legeling/PromptHub) into .agents/skills/spec-init in your project. Codex loads it when a task matches its description.

Can I use Spec Init in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add legeling/PromptHub --skill spec-init -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/spec-init, .gemini/skills/spec-init, .github/skills/spec-init and .opencode/skills/spec-init in your project.

What does Spec Init need to run?

SKILL.md names no scripts, command-line tools or credentials: Spec Init is instructions for the agent only.

Does Spec Init access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Spec Init safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Spec Init use?

Spec Init is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Spec Init use?

About 645 tokens (SKILL.md is roughly 2.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.5k tokens, read only when the agent opens those files.

What are the alternatives to Spec Init?

Skills that share tags, products or a category with Spec Init: Init (asgeirtj/system_prompts_leaks, 69k stars), Init (asgeirtj/system_prompts_leaks, 69k stars), Init (brycewang-stanford/Auto-Empirical-Research-Skills, 4.5k stars) and Init (partcad/partcad, 503 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Spec Init?

legeling (a GitHub user) maintains it in legeling/PromptHub, which has 1,697 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on September 28, 2026.

Source: legeling/PromptHub on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.