文档生成
- 作者仓库星标 796
- 作者更新于 实时读取
- 作者仓库 jiuwenswarm
- 领域
- 文档
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @openJiuwen-ai · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 即装即用
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 底层运行要求
- 无特殊要求
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- 网络行为
- 允许外网请求
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: skill-gen-4-enterprise-doc
description: Turn SOPs, URLs, or stated intent into an installed skill package. Use when the user asks to gen…
category: 文档
runtime: 无特殊运行时
---
# skill-gen-4-enterprise-doc 输出预览
## PART A: 任务判断
- 适用问题:PRD、RFC、README、项目说明或知识库整理。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“What you do (high level) / Invoking skillgeneratorcli.py safely / Normative SKILL.md format (YAML frontmatter first)”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于PRD、RFC、README、项目说明或知识库整理,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“What you do (high level) / Invoking skillgeneratorcli.py safely / Normative SKILL.md format (YAML frontmatter first)”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、会按任务需要访问外部网络、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件;会按任务需要访问外部网络;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文没有稳定的斜杠命令要求。安装验证后通常全局生效,直接在对话里点名这个 Skill 并描述任务即可。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件。
先用一个小任务确认它会围绕“What you do (high level) / Invoking skillgeneratorcli.py safely / Normative SKILL.md format (YAML frontmatter first)”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: skill-gen-4-enterprise-doc
description: Turn SOPs, URLs, or stated intent into an installed skill package. Use when the user asks to gen…
category: 文档
source: openJiuwen-ai/jiuwenswarm
---
# skill-gen-4-enterprise-doc
## 什么时候使用
- 把项目文档方向的常用动作沉淀成 Agent 可调用的技能 适合处理README、PRD、RFC、教程和知识库文档,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代的…
- 面向PRD、RFC、README、项目说明或知识库整理,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「What you do (high level) / Invoking skillgeneratorcli.py safely / Normative SKILL.md format (YAML frontmatter first)」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件;会按任务需要访问外部网络;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "skill-gen-4-enterprise-doc" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> What you do (high level) / Invoking skillgeneratorcli.py safely / Normative SKILL.md format (YAML frontmatter first)
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> 无特殊运行时 | 读取文件、写入/修改文件 | 会按任务需要访问外部网络
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Skill Generator (enterprise doc → installed skill)
Instructions here, reference/, and scripts/ (package scripts/skill_gen/). You obtain SOP plain text, run full structured extraction exactly as in reference/sop-structure-pipeline.md, author the package under get_agent_workspace_dir() / "skills-draft" (per reference/generator-worker-spec.md), then immediately promote it so the skill is installed and loadable (see reference/operator-playbook.md canonical flow).
What you do (high level)
- Plain text
- Mandatory sequence when the user wanted a document but you still have no SOP plain text (wrong path, file not found, fetch failed, empty body, permission error, etc.):
- Recovery before fallback — Do not call
build_intent_fallback_sop,build_fallback_sop_structure, or generate the installable skill from intent-only fallback in the same assistant turn as that failure. A missing file is only a failed first ingest; it is not “no document” yet. Send exactly one recovery message first (single reply): offer a corrected absolute path, URL, or paste—same menu and tone as reference/sop-recovery-and-interview-fallback.md Part 1—and wait for the user’s next message (or treat recovery as already done if one recovery was sent earlier in the thread and the user declined, ignored, or supplied material afterward). - Fallback only after recovery — Only when recovery is complete (user gave path/URL/paste you can use, or declined/ignored after the one ask) and there is still no parseable SOP body, proceed to
build_intent_fallback_sop/build_fallback_sop_structurebelow. Do not skip step (1) because you “already know” the path failed.
- Recovery before fallback — Do not call
- Local file →
python3 <ABS>/scripts/skill_generator_cli.py sop-text --sop-file <abs-path> [--out-text <path>]or read the file in-tool; optional--print-raw-charsfor length. - HTTP(S) / WeChat →
url-fetch --url '…' [--out-json <path>]then use pagetextas the SOP body for extraction. - Pasted only — use the same string as input to
parse_sop_raw_text(no skipping structured extraction). - No document after recovery — you must build the canonical object in code. Preferred (one call):
await skill_gen.sop_fallback.build_intent_fallback_sop(user_intent=…, skill_name_hint=…, invoke_llm_json=…)— default: passinvoke_llm_jsonwhenever the runtime can invoke the model: deterministic skeleton then internal LLM refine (enrich_fallback_sop_with_llm). Only if the system cannot call a model for this step, passinvoke_llm_json=None(skeleton only) or useskill_gen.sop_fallback.build_fallback_sop_structureon sync-only paths (same shape; no enrich). SameSOPStructurefields as extraction (title, purpose, scope, roles, steps,knowledge_items, sections, decision points, exceptions, references, plus synthesizedraw_text). Do not callparse_sop_raw_texton empty text; do not hand-write a “representative” or illustrative SOP in prose instead of running the fallback—downstream drafting depends on the realSOPStructureandextraction_meta. Treatextraction_meta["fallback_sop"]as “template only” in the generated skill body. Still no real SOP after LLM polish: keepfallback_sopsemantics and do not treat output as audited policy.
- Mandatory sequence when the user wanted a document but you still have no SOP plain text (wrong path, file not found, fetch failed, empty body, permission error, etc.):
- Structured SOP (required) → Either
skill_gen.sop_parser.parse_sop_file/parse_sop_raw_textwithinvoke_llm_jsonwhen you have SOP plain text, or when you do not:await skill_gen.sop_fallback.build_intent_fallback_sop(..., invoke_llm_json=…)withinvoke_llm_jsonwhenever the runtime can invoke the model (default: skeleton + internal enrich);invoke_llm_json=Noneorbuild_fallback_sop_structureonly when the system cannot (single path; sop-structure-pipeline.md). - Draft package → under
get_agent_workspace_dir() / "skills-draft" / <skill_name>(when the host exposes that helper) or the equivalent agent-workspace path from the system prompt:SKILL.md(YAML frontmatter first) plus optionalreference/, per generator-worker-spec.md. Createskills-draftnext to the runtimeskills/folder if it does not exist.- Intent-only snapshot (required when fallback) — If
extraction_meta["fallback_sop"]is true (intent-only / template path), you must addreference/intent-sop-snapshot.mdin that draft folder. Start with a short warning block (this is not an authoritative enterprise SOP; synthesized from stated intent and optional LLM refine; provisional until a real document is attached). Then include the verbatimSOPStructure.raw_textfrom the structured object you used for drafting so reviewers can see exactly what the fallback produced.
- Intent-only snapshot (required when fallback) — If
- Install in the same workflow → Call
skills.import_localwithpath= absolute path to that draft directory (folder containingSKILL.md). Useforce: trueifget_agent_skills_dir() / <skill_name>already exists and should be replaced. Do not stop after step 3 and ask the user to import manually; promotion is part of this skill’s default completion.
After step 4, the new skill lives under get_agent_skills_dir() / <skill_name> (same directory tree the runtime loads user-installed skills from) and is available like any other installed skill.
Do not silently shrink generator-worker-spec when writing SKILL.md.
Invoking skill_generator_cli.py safely
- Always use the absolute path to
scripts/skill_generator_cli.py. httpx/beautifulsoup4forurl-fetch. Rich file formats need openjiuwenAutoFileParserwhen installed; otherwise use.md/.txtSOPs.
Path tables and skills.import_local: reference/operator-playbook.md.
Normative SKILL.md format (YAML frontmatter first)
The generated skill’s SKILL.md must start with --- YAML frontmatter, then ---, then the body. Optional: scripts/skill_gen/validator.py on the draft path before import.
When to open reference files
| File | When |
|---|---|
| reference/sop-structure-pipeline.md | Always: SOPStructure extraction. |
| reference/sop-recovery-and-interview-fallback.md | Always before intent-only fallback: recovery menu wording and ordering (Part 1). |
| reference/generator-worker-spec.md | Always: how to write a high-quality generated skill — Writing a high-quality SKILL.md (required structure) plus Skill writing guide. |
| reference/operator-playbook.md | CLI, paths, skills.import_local, canonical flow, directory table, SKILL.md frontmatter rules. |
Human approval gates
Do not modify this meta-skill’s SKILL.md, reference/sop-structure-pipeline.md, reference/generator-worker-spec.md, reference/operator-playbook.md, or other bundled reference/*.md while generating a user skill. Edit only the target skill under the workspace-relative skills-draft/<name>/ staging tree or the installed skills/<name>/ tree (resolve with get_agent_workspace_dir() / get_agent_skills_dir() when available).
Communicating with the user
- Prefer plain language for skill names and outcomes.
- Infer
skill_name(kebab-case) from title or URL when the user did not specify.
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核