xiaohongshu
xiaohongshu
kodex-init
Bootstrap a Kodex knowledge base by analyzing codebase structure and creating topic stubs
Full skill instructions
Bootstrap a Kodex knowledge base by analyzing codebase structure and creating topic stubs.
This skill analyzes a codebase to identify logical topic boundaries and creates stub topics in the Kodex knowledge base. Topics are created as drafts requiring human approval before going live.
Use when:
Walk the directory tree to understand the project structure.
ls -d */ 2>/dev/null | grep -v -E '^(node_modules|vendor|\.git|dist|build|out|coverage|__pycache__|\.)'
Look for these files to identify the tech stack:
package.json → Node.js/React/Vuepubspec.yaml → Flutter/DartCargo.toml → Rustgo.mod → Go*.csproj → .NETrequirements.txt / pyproject.toml → PythonDockerfile, docker-compose.yml → deployment topic.github/workflows/, .gitlab-ci.yml → ci-cd topicjest.config.*, vitest.config.*, pytest.ini → testing topic.env, config/ → configuration topicAlways exclude:
node_modules/, vendor/, .git/dist/, build/, out/, coverage/__pycache__/, .cache/.)For each significant directory (3+ files or contains entry point):
topic_name = kebab-case(directory_name)
title = Title Case(directory_name)
source_files = [list of files in directory]
Check for and add these standard topics when indicators exist:
| Topic | Indicators |
|---|---|
deployment | Dockerfile, docker-compose.yml, k8s/, helm/ |
ci-cd | .github/workflows/, .gitlab-ci.yml, .circleci/ |
testing | test/, tests/, .test., jest.config.*, pytest.ini |
configuration | .env*, config/, settings.* |
database | migrations/, schema/, prisma/, drizzle/ |
authentication | auth/, login/, session/, jwt/ |
api | routes/, controllers/, api/, endpoints/ |
Display the proposed topic list to the user:
Proposed topics for this codebase:
1. [name]: Title (N files)
- path/to/file1
- path/to/file2
2. [name]: Title (N files)
...
Ask user:
What would you like to do?
1. Approve all - Create these topics
2. Add a topic - I want to add another
3. Remove a topic - Remove one from the list
4. Edit a topic - Modify name or files
Handle modifications and re-display until user approves.
For each approved topic, call the MCP tool:
Tool: mcp__plugin_mermaid-collab_mermaid__kodex_create_topic
Args: {
"project": "<absolute-path-to-cwd>",
"name": "<topic-name>",
"title": "<Topic Title>",
"content": {
"conceptual": "# <Topic Title>\n\nTopic pending documentation.\n\n## Source Files\n- path/to/file1\n- path/to/file2",
"technical": "",
"files": "",
"related": ""
}
}
After creating all topics, flag each one as incomplete so they appear in the fix queue:
Tool: mcp__plugin_mermaid-collab_mermaid__kodex_flag_topic
Args: {
"project": "<absolute-path-to-cwd>",
"name": "<topic-name>",
"type": "incomplete",
"description": "Stub topic needs detailed content based on actual codebase analysis"
}
Call this for each topic created in Step 4.
After creating and flagging all topics, display:
Created N topics as drafts:
- topic-1: Title 1
- topic-2: Title 2
...
All topics flagged as incomplete for review.
Use /kodex-fix to fill in detailed content, or review drafts in the Kodex UI.
| Error | Action |
|---|---|
| Cannot read directory | Log warning, skip, continue |
| No significant directories | Warn user, ask for guidance |
| MCP tool fails | Log error, continue with remaining |
| User cancels | Exit with no changes |
| Tool | Purpose |
|---|---|
kodex_create_topic | Create a new topic as draft |
kodex_list_topics | Check existing topics before creating |
kodex_flag_topic | Flag topic as incomplete for review |
Standalone skill - Does not require an active collab session.
Related skills:
kodex-fix - Fix flagged incomplete topicsusing-kodex - Query and flag existing topicsxiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience