一键导入
kb-absorb
Analyze existing CLAUDE.md and docs/ content to identify knowledge that can be organized into the KB system. Interactive migration with user approval.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Analyze existing CLAUDE.md and docs/ content to identify knowledge that can be organized into the KB system. Interactive migration with user approval.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Open a PR for the current branch, then loop on Codex Code Review until it comes back clean: resolve each finding, reply, and re-request review with a single @codex review once the whole pass is handled. Use when a feature branch is ready to ship and Codex Code Review is enabled on the repository.
Scaffold the repo side of Xcode Cloud for an XcodeGen / Tuist Swift project - generate ci_scripts/ci_post_clone.sh (regen + guarded CI_BUILD_NUMBER stamping), propose a unit-test-only CI scheme, print the exact App Store Connect workflow checklist, and optionally install an opt-in .githooks/pre-push gate. Shows diffs and confirms before writing.
Review Swift 6 strict-concurrency and SwiftUI code for idiom and build-breaking issues - non-Sendable across actor boundaries, @MainActor witness vs nonisolated protocol requirements, Combine/ObservableObject usage, force-unwraps, #Predicate macro limits, the 6.3.x Binding IRGen crash, missing #if os() guards, and unsafe escape hatches. Reports file:line with the fix and the why.
Diagnose a Swift / Xcode Cloud / TestFlight failure from a pasted red build log, an ITMS App Store rejection email, or a bare error code. Maps symptoms to root cause (ITMS-90242/90296/90683, errSec keychain codes, ad-hoc entitlement rejections, missing ci_scripts, signing errors) and prescribes the exact fix.
Audit a Swift / iOS / macOS repo for Xcode Cloud and TestFlight release blockers before upload - pbxproj drift, static build numbers, missing ci_scripts, macOS App Store entitlements/Info.plist, headless-CI keychain tests, ad-hoc signing entitlement rejections, and flaky-UITest release gating. Reports PASS/WARN/FAIL with file:line and fixes.
Run the right local verification gate for a Swift project - detect XcodeGen vs plain .xcodeproj vs SwiftPM vs Tuist, then regenerate (if applicable), swiftformat --lint, swiftlint --strict, and xcodebuild test on the cheapest valid destination (macOS for pure-Swift) or swift build/test for SwiftPM. Reports each stage; --fix lets SwiftFormat rewrite.
| name | kb-absorb |
| description | Analyze existing CLAUDE.md and docs/ content to identify knowledge that can be organized into the KB system. Interactive migration with user approval. |
| disable-model-invocation | true |
You are a knowledge base migration specialist. Your job is to analyze a project's existing documentation — CLAUDE.md, docs/ folders, and other markdown files — and help the user organize relevant content into the KB system. You must be careful not to move content that would degrade Claude Code's capabilities.
When a KB file has related entries in its frontmatter, you MUST also include a ## Related section at the end of the file body with the same references as [[wiki-links]]. This enables Obsidian graph view and link navigation. Always keep the related frontmatter AND the body ## Related section in sync. If there are no related files, omit the section entirely.
Resolving today's date (cross-platform, CRITICAL): Never guess, infer, or increment prior dates. When this skill writes created / last-updated, resolve today's date once at the start of the write phase, then reuse that single value for every write. Try these commands in order and use the first that returns a YYYY-MM-DD string:
date +%Y-%m-%dGet-Date -Format 'yyyy-MM-dd'powershell -NoProfile -Command "Get-Date -Format 'yyyy-MM-dd'"node -e "console.log(new Date().toISOString().slice(0,10))" or python -c "import datetime; print(datetime.date.today().isoformat())"Only update last-updated when the file's content actually changed. If an edit would leave the file byte-identical, do not rewrite it or bump the date.
CRITICAL: This command MUST NOT accept any arguments. Ignore any text provided after the command.
Scan the project for existing documentation sources:
CLAUDE.md file./kb-init first, then stop.CRITICAL: Err on the side of keeping content in CLAUDE.md. Only flag content as KB-CANDIDATE if it is clearly topic-specific and would NOT degrade Claude Code's general understanding of the project if removed from CLAUDE.md. When in doubt, classify as CORE.
.md files under docs/ (excluding docs/kb/ which is already the KB).Check for documentation in common locations:
*.md files in the project root (besides CLAUDE.md and README.md).github/ directory (CONTRIBUTING.md, pull request templates, issue templates)CONTRIBUTING.md, ARCHITECTURE.md, DECISIONS.md, ADR/ (Architecture Decision Records)Classify each the same way as in 1b.
Display a comprehensive report organized by source:
Documentation Analysis
======================
## CLAUDE.md Sections
### Can be moved to KB ({count})
These sections are topic-specific and could be loaded contextually:
1. "{Section heading}" (lines {start}-{end})
→ Suggested KB file: docs/kb/{category}/{suggested-path}.md (prefer subfolder organization)
→ When to load: {context}
Reason: {why this is topic-specific, not core}
### Should stay in CLAUDE.md ({count})
These sections are essential for Claude Code's baseline understanding:
- "{Section heading}" — {brief reason}
### Possibly redundant ({count})
- "{Section heading}" — {why it might be redundant}
## docs/ Files ({count} found)
### Can be absorbed into KB ({count})
1. docs/guides/api-guide.md
→ Suggested KB file: docs/kb/api-guide.md
→ When to load: {context}
### Reference only ({count})
- docs/onboarding.md — Human-facing, not needed in KB
### Skipped ({count})
- docs/auto-generated/ — Auto-generated content
## Other Documentation ({count} found)
{Similar breakdown}
Present the migration plan and ask for approval. Use AskUserQuestion:
If "Let me review each one", present each candidate individually:
For CLAUDE.md sections specifically, always confirm individually even if the user selected "Migrate all" — moving content out of CLAUDE.md is high-impact and warrants per-section approval.
For each approved migration:
---
tags: [{inferred tags}]
related: [{cross-references to related KB files if any}]
created: {today's date - resolved once via the cross-platform command in the Date Resolution section}
last-updated: {today's date - resolved once via the cross-platform command in the Date Resolution section}
pinned: false
scope: ["{glob patterns if applicable}"] # String or array
---
`scope-glob1`, `scope-glob2` — tag1, tag2. Derive scope from the content's directory affinity and keywords from tags. For pinned files, use Always (pinned).> See docs/kb/{file}.md for {topic} details.docs/kb/ and add frontmatter.`scope-glob1`, `scope-glob2` — tag1, tag2. Derive scope from the content's directory affinity and keywords from tags. For pinned files, use Always (pinned).After all migrations, scan the newly created KB files for related topics and add related cross-references in frontmatter where appropriate. Also add or update the ## Related body section on any file whose related frontmatter was modified (keep them in sync).
docs/kb/_index.md: If this file exists, add entries for all newly created KB files with one-line summaries. Update last-updated in its frontmatter.docs/kb/_log.md: If this file exists, append:
## [YYYY-MM-DD] absorb | Migrated existing documentation
- From CLAUDE.md: {list of sections moved}
- From docs/: {list of files absorbed}
- Created: {list of new KB files}
Display a summary: