AGENT SKILL

skill-library-and-agent

Use when working with the skill library subsystem — skills/ data layout, the router, the skilllib CLI (sync/build/route/stats/export/import/ollama/agent/chat), the local Ollama agent, or adding/exporting skills.

License 许可
MIT
最近更新
2026-08-11
Stars
★ 0
Forks
0

01 前言 Front Matter

name
skill-library-and-agent
license
MIT
sources
[ "vercel-labs/skills (find-skills, update flow)", "anthropics/skills" ]
version
1.0.0
description
Use when working with the skill library subsystem — skills/ data layout, the router, the skilllib CLI (sync/build/route/stats/export/import/ollama/agent/chat), the local Ollama agent, or adding/exporting skills.

03 SKILL.md 正文

Skill Library & Local Agent

Layout

skills/            sources/ (gitignored clones) · normalized/ · index/ · manifests/
router/            stdlib-only tokenizer + scorer + route()
scripts/           skilllib CLI: sync · build · route · stats · export · import · ollama · agent · chat · modelfile
agent/             ollama_client (streaming REST) · solver (route→inject→generate) · modelfile
config/            library.toml — sources, paths, router weights, [agent] knobs (DATA-ONLY: no __init__.py, must never shadow config.py)
prompts/           route.md · skill-use.md · agent-system.md

The pipeline

skilllib sync shallow-clones the enabled = true repos in config/library.toml → build normalizes each SKILL.md (frontmatter → metadata, sha256 hash, names sanitized to [a-z0-9-], duplicates disambiguated), writes skills/normalized/, then builds skills/index/index.json and the manifests. Curated project skills (.agents/skills/<name>/SKILL.md) are indexed too, with source: "curated/local" — build must be re-run after adding one.

Router & agent flow

route(query, index, top_k) scores name/description/keywords/bigrams; hits feed agent.solver.solve() which excerpts each skill body (curated ones read from .agents/skills/), composes them with the system personality (prompts/agent-system.md) and the task, then calls Ollama — streaming, max_tokens-capped. skilllib chat is a REPL that re-routes every turn and keeps the last max_history_turns exchanges.

Export / import

skilllib export → export/skills-bundle.json (self-contained: curated + library + index + manifests) and export/skills-prompt.md (for handing to another model). skilllib import bundle.json restores everything offline with zero pip installs (PyYAML is lazily imported); build afterwards regenerates identical index/manifests from the restored tree when no source clones exist. See skills-migration.md.

Common mistakes

  • Editing config/ — it's data-only by design; adding __init__.py would shadow the app's config.py.
  • Adding a curated skill without re-running build — it won't appear in the index or route.
  • Regenerating export artifacts after changes — the bundle is a snapshot; re-export to keep it current.
  • Testing the agent with a real model when a stub suffices — tests/test_agent.py runs a stub Ollama server; live calls take minutes on CPU.

04 同仓库更多 Skills

BangerSoul
BangerSoul/whatsapp-mtd-sales-automation

vercel-react-view-transitions

Guide for implementing smooth, native-feeling animations using React's View Transition API (`<ViewTransition>` component, `addTransitionType`, and CSS view transition pseudo-elements). Use this skill whenever the user wants to add page transitions, animate route changes, create shared element animations, animate enter/exit of components, animate list reorder, implement directional (forward/back) navigation animations, or integrate view transitions in Next.js. Also use when the user mentions view transitions, `startViewTransition`, `ViewTransition`, transition types, or asks about animating between UI states in React without third-party animation libraries.

★ 0
BangerSoul
BangerSoul/whatsapp-mtd-sales-automation

vercel-react-native-skills

React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.

★ 0
BangerSoul
BangerSoul/whatsapp-mtd-sales-automation

vercel-react-best-practices

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

★ 0
BangerSoul
BangerSoul/whatsapp-mtd-sales-automation

vercel-composition-patterns

React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.

★ 0
BangerSoul
BangerSoul/whatsapp-mtd-sales-automation

supabase-postgres-best-practices

Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the tests that verify them, indexes, triggers, database functions, queues and scheduled jobs (pg_cron, pgmq), vector/semantic search (pgvector), and restoring dumps (pg_restore) or importing data. Also load it when diagnosing slow queries, high CPU, timeouts, EXPLAIN plans, connection exhaustion, locking, bloat, or rows visible to the wrong user or tenant. This is not just a performance guide — schema, migration, security, and SQL authoring tasks need these rules too, even for a one-column change or a single query.

★ 0
BangerSoul
BangerSoul/whatsapp-mtd-sales-automation

skill-installer

Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos).

★ 0