mit einem Klick
surchin-seed
// Seed the Surchin knowledge base with foundational insights and skills from this repository
// Seed the Surchin knowledge base with foundational insights and skills from this repository
Deposit knowledge into Surchin (solutions, patterns, pitfalls)
View or set persistent preferences that carry across sessions
Search Surchin knowledge base for solutions, patterns, and pitfalls
Rate Surchin insights as helpful or unhelpful
Check Surchin connection status and show active preferences
| name | surchin-seed |
| description | Seed the Surchin knowledge base with foundational insights and skills from this repository |
| user-invocable | true |
| disable-model-invocation | false |
| allowed-tools | ["mcp__surchin__query_insights","mcp__surchin__deposit_insight","mcp__surchin__create_skill","Read","Glob","Bash"] |
Bootstrap the Surchin knowledge base with foundational insights and skills from this repository. Run this once when first setting up Surchin for a project.
Call query_insights with query set to "seeded repository context", tag_context set to ["seeded"], and limit set to 1.
If results come back, tell the user this repo has already been seeded and show the count. Ask if they want to proceed anyway. If not, stop here.
Read the following files (skip any that don't exist):
package.json (root) — name, scripts, dependencies, devDependenciespnpm-workspace.yaml or check package.json for workspaces field — workspace layoutpackage.json — name, dependenciesREADME.md — project description and setup instructionsCLAUDE.md — coding conventions, pitfalls, architecture notesAGENTS.md — agent integration instructions.env.example (or .env.sample, .env.template) — required environment variable names only (never values!)turbo.json, tsconfig.json, or equivalent build configls to see the top-level directory structurels on key subdirectories (src/, apps/, packages/, etc.) for 2-level depthsupabase/migrations/, prisma/migrations/, migrations/, db/migrations/.github/workflows/, .gitlab-ci.ymlgit log --oneline -5 --no-decorate for recent activity contextgit remote get-url origin for the repo identifierBased on what you read, generate 10-20 seed insights covering these categories (skip any that don't apply):
| Category | Kind | What to capture |
|---|---|---|
| Project overview | CONTEXT | Language, frameworks, monorepo structure, what the project does |
| Workspace layout | CONTEXT | What each workspace/package contains and its role |
| Database & data model | CONTEXT | Tables, schemas, migration strategy, ORM/driver used |
| Auth & authorization | CONTEXT | Auth strategy, middleware patterns, role system |
| API structure | CONTEXT | Route patterns, API conventions, request/response formats |
| Key dependencies | DEPENDENCY | Important libraries and why they're used |
| Build & test commands | CONTEXT | How to build, test, lint, deploy |
| Environment setup | CONTEXT | Required env vars, local dev prerequisites |
| Coding conventions | CONTEXT | Patterns from CLAUDE.md — naming, style, architecture rules |
| Known pitfalls | PITFALL | Gotchas from CLAUDE.md or README warnings |
Use deposit_insight in batch mode (up to 10 per call). For every insight:
kind: CONTEXT, DEPENDENCY, or PITFALL (never SOLUTION/PATTERN/WORKFLOW for seeds)tags: Always include "seeded" plus domain tags (e.g., "auth", "database", "api")file_patterns: Relevant file paths or glob patternssymbol_names: Key functions, classes, or modules mentionedidempotency_key: Use format seed:{repo-name}:{topic-slug} (e.g., seed:my-app:project-overview)Search for skill files in the repository:
Glob for .claude/skills/*/SKILL.mdGlob for **/skills/*/SKILL.md — but skip anything under node_modules/ or packages/mcp-server/skills/ (those are Surchin's own built-in skills)For each SKILL.md found, read it and parse:
--- markers): extract name and description fields---): this becomes the instructionsFor each discovered skill, call create_skill with:
name: from frontmatter name fielddescription: from frontmatter description fieldinstructions: the markdown body after frontmattertrigger_tags: infer 3-5 tags from the skill content (e.g., a skill about code review → ["code-review", "pull-request"])trigger_files: if the skill mentions specific file patterns, include themstatus: "published"The create_skill tool is idempotent by name — if a skill with the same name already exists, it will be skipped.
Tell the user:
.claude/skills/, .claude/commands/, or project-level skill directories)