Skip to content
wk1995Public

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

170 Commits

Folders and files

Repository files navigation

Personal Skills

Language: English | 中文

Personal Skills is a monorepo for managing personal Agent Skills. Each Skill owns its content and version, while the repository is intended to provide shared Skill management, CLI, MCP server, and runtime adapter capabilities. A Skill may also contribute its own CLI commands or MCP tools when needed.

Current State

  • Done: repository purpose, portable Skill conventions, declarative Codex, WorkBuddy, WorkBuddy AI, and DeepSeek Harness adapters, deterministic Agent builds, and PR validation.
  • Planned: shared management packages, CLI, MCP server, installation, registry publishing, and release automation.
  • Available now: the Python catalog validator and Agent builder shown below. The project-level skills ... CLI commands remain planned interfaces.

See Agent Build Architecture for the current adapter and version boundaries. The original repository design remains as historical context.

Design Principles

  • Portable core: Basic Skills follow the Agent Skills Specification and are not tied to a single agent product.
  • Open adapters: Agent adapters are discovered from platforms/*/adapter.json; adding a default adapter does not require editing every Skill or a central switch.
  • Independent versions: Portable Skill, adapter, and generated artifact versions have separate lifecycles.
  • Progressive extension: Beyond the managed-file contract, scripts, references, assets, CLI commands, and MCP tools are added only when useful.
  • One core, two interfaces: The CLI and MCP server should reuse the same discovery, validation, installation, versioning, and publishing logic.
  • Explicit trust: Executable extensions from remote Skills are disabled by default and require clear user approval before they are loaded.

Target Directory

The tree below is planned architecture. It does not mean every file or directory already exists.

skill/
|-- README.md
|-- README.zh-CN.md
|-- skills/
|   `-- <skill-name>/
|       |-- SKILL.md              # Required: portable agent entrypoint, version, and trigger rules
|       |-- README.md             # Required: English user guide
|       |-- README.zh-CN.md       # Required: Chinese user guide
|       |-- CHANGELOG.md          # Required: portable Skill changes
|       |-- agent-builds/         # Required boundary; per-Agent overrides are optional
|       |   `-- codex/
|       |       `-- agents/openai.yaml
|       |-- extensions.yaml       # Optional: CLI/MCP extension declaration
|       |-- src/                  # Optional: extension implementation
|       |   |-- core.ts
|       |   |-- cli.ts
|       |   `-- mcp.ts
|       |-- scripts/              # Optional: deterministic scripts
|       |-- references/           # Optional: lazily loaded reference material
|       |-- assets/               # Optional: templates and static assets
|       `-- tests/                # Optional: behavior, script, and extension tests
|-- platforms/
|   |-- codex/
|   |   |-- adapter.json          # Adapter and artifact versions, output layout
|   |   |-- SKILL.append.md       # Codex-wide generated instructions
|   |   `-- root/.codex-plugin/plugin.json
|   |-- workbuddy/
|   |   |-- adapter.json
|   |   `-- SKILL.append.md
|   |-- workbuddy-ai/
|   |   |-- adapter.json
|   |   `-- SKILL.append.md
|   `-- dsh/
|       |-- adapter.json
|       `-- SKILL.append.md
|-- scripts/
|   `-- agent_build.py            # Discovers and builds every platform adapter
|-- packages/                     # Planned shared management runtime
|   |-- core/                     # Skill discovery, validation, installation, and versioning
|   |-- sdk/                      # Skill CLI/MCP extension API
|   |-- cli/                      # Project-level CLI
|   `-- mcp-server/               # Project-level MCP server
|-- schemas/                      # JSON contracts; relationship report implemented, others planned
|   |-- skill.schema.json
|   |-- skillset.schema.json
|   |-- extensions.schema.json
|   `-- skill-relationships.schema.json # Implemented local report contract
|-- tests/
|   |-- contract/
|   `-- integration/
|-- .changes/                     # Independent Skill version change records
|-- package.json
|-- pnpm-workspace.yaml
|-- tsconfig.base.json
`-- dist/                         # Build output, not committed

The Agent Skills specification requires SKILL.md. This repository additionally requires bilingual user guides, a changelog, and the agent-builds/ boundary; see AGENTS.md. Platform subdirectories inside that boundary are created only when the Skill needs an override.

Skills

Every Skill has a companion README with usage and trigger guidance. This table is generated by python scripts/skill_catalog.py --write; do not edit the rows by hand.

Skill Purpose Documentation
build-pipeline-engineering Configure, validate, run, and troubleshoot reproducible distributable builds from an exact source ref for Android, Windows, Linux, and plugins, including installer/package selection, CI, signing, runtime dependencies, verification, manifests, checksums, and uploads. For variant-based builds default to release; for CI output default to GitHub Actions Artifacts. Do not use for requirement branches, PR integration, source version changes, or tag creation. README
choose-project-doc-location Choose paths for new or existing project documentation and organize document locations within a specified folder or project. Use for README, Wiki, PRDs, technical documents, and machine-readable state-machine specifications. Determine project ownership and recommend or apply suitable locations; do not manage document relationships, content schemas, or business semantics. README
email-management Manage selected QQ, NetEase, Gmail, Feishu and standard IMAP/SMTP mailboxes through existing CLI/MCP backends, with local-only account references, reading, search, drafts, authorized sending and basic management. Use for email-account setup and mailbox tasks; exclude mail-server administration and marketing campaigns. README
fork-repository-maintenance Plan adoption of existing forks, create selected-branch forks, manually synchronize same-name source branches while protecting an independent personal default branch, integrate upstream versions into personal work, and preserve or restore verified Git snapshots. Use for fork adoption and setup, source sync, personal fork upgrades, or code preservation; exclude ordinary Git operations, release trains, and Skill-copy synchronization. README
git-commit-message Mandatory before every agent Git commit in any repository, including commit-and-push tasks, amend, message-file commits, and commits invoked through helpers. Check and normalize AI client/model attribution and optional machine/repository prefixes. Also use to configure policy or install its commit-msg hook; exclude read-only Git, staging alone, and push-only tasks. README
pr-review-loop Review a specific pull request. Run the fix, commit, push, and re-review loop when the authenticated account is the pull-request author and either a project-scoped policy or Skill applies or a machine-wide policy lists the pull-request repository. The independent comment switch controls PR comments; max_rounds controls review cycles, with zero allowing one read-only review. Every posted comment carries the platform and model marker. The fix loop has review-cycle and retry limits. Use for requests to review a named pull request or continue its review. Do not use for a local-only report, a request forbidding both comments and code changes, or pull-request administration. README
source-version-train Orchestrate source code from a requirement branch through a visible publish PR, a hidden release candidate, packaging and publish interfaces, and an immutable source tag. Use for feature/bugfix branches, dev and publish PRs, code gates, version metadata, or source tags; do not use to implement packaging or a publish destination. README
sync-skills Use when linking, converting, synchronizing, inventorying, reporting, repairing Agent installs with source provenance and build freshness checks, versioning, auditing, or rolling back Skill copies across repository, project, machine-wide, or explicit external locations. README

Pull Request Review Gate

Run bash tests/pr-review-gate.sh origin/main from a clean, committed worktree before declaring a PR ready, and follow the independent adversarial passes in the PR review playbook. The skill-catalog required GitHub Actions check invokes the same gate before a PR can merge into main. It validates the complete PR diff and simulated merge, protects legacy .skill-sync/ state until its coordinated migration is complete, rejects unexpected tracked ignored files, parses Python sources, and runs every repository validation test. New sync state defaults to an external XDG state directory. A green gate is necessary but does not replace path-identity, direct-entry-point, recursive-rule, dependency-degradation, and failure-state review. For internal branches it can still commit regenerated catalogs when SKILL_CATALOG_TOKEN is configured; fork PRs must commit both generated root READMEs themselves.

The Skill provenance regression suite groups the four review findings: report/repair freshness, artifact and snapshot execute bits, recursive exclusions, and publication/recovery failures. Run bash tests/skill-provenance.sh for focused checks. It is included in the required gate, and the Skill provenance regressions workflow also runs it with Python 3.10 on Ubuntu and macOS for PRs and default-branch pushes. The required skill-catalog job waits for both OS jobs. Explicit test IDs make missing regressions fail instead of silently running zero tests.

Skill Structure And Versioning

A minimal managed Skill:

skills/example-skill/
|-- SKILL.md
|-- README.md
|-- README.zh-CN.md
|-- CHANGELOG.md
`-- agent-builds/
    `-- .gitkeep

SKILL.md keeps portable metadata, independent versioning, and optional trigger rules:

---
name: example-skill
description: Use when the user asks for a concrete example Skill workflow.
metadata:
  sync_id: "example-skill"
  version: "1.0.0"
  urls:
    - type: repository
      value: https://github.com/example/example-skill
    - type: documentation
      value: https://example.com/example-skill/docs
  triggering:
    include:
      - The user explicitly asks to create, edit, validate, or publish example-skill.
      - The current task needs to reuse workflow instructions from example-skill.
    exclude:
      - The user is only asking about the overall Skill repository architecture.
      - The current task only needs ordinary code changes and does not involve example-skill.
---

name, description, metadata.sync_id, and metadata.version are the baseline contract. metadata.sync_id is the immutable identifier of the logical Skill used by sync-skills; choose it when the Skill is created and do not change it when the trigger name or directory changes. description remains the natural-language discovery text used by Agent Skills. metadata.urls is optional stable provenance information for the logical Skill, such as a source repository, documentation page, registry page, package page, or upstream project. metadata.triggering is this repository's structured supplement: include describes explicit trigger cases, and exclude describes explicit non-trigger cases. When metadata.triggering is not configured, it is equivalent to include: [] and exclude: []. exclude takes priority over include to avoid accidental keyword-triggered activation.

Keep Agent-specific invocation syntax, installation paths, UI metadata, and manifests out of portable SKILL.md. Put defaults in platforms/<agent>/ and exceptional per-Skill files in agent-builds/<agent>/.

A Skill with executable extensions may add:

skills/example-skill/
|-- SKILL.md
|-- extensions.yaml
|-- src/
|   |-- core.ts
|   |-- cli.ts
|   `-- mcp.ts
`-- tests/

src/core.ts should contain shared CLI/MCP business logic. cli.ts and mcp.ts should handle registration and protocol adaptation only.

Shared Metadata And Audit Conventions

These conventions are shared across Skills and management tools. They should be reflected in schemas, registries, CLI output, and MCP resources as those pieces are implemented.

The proposed machine-local inventory and cross-project mapping output is specified in the Skill Relationship Report PRD, with a repository-versioned technical design and test plan. The generated relationship reports remain local-only. Their current machine-readable contract is skill-relationships.schema.json. The executable report contract is the portable validator. JSON Schema is informative; runtime uses only its shared status vocabulary, not a Draft 2020-12 engine.

Stable Skill information

Keep stable self-description in SKILL.md:

  • metadata.sync_id: immutable synchronization-group identifier. Choose it when creating the Skill; it must survive Skill name and directory changes.
  • metadata.version: the Skill's independent version.
  • metadata.urls: canonical addresses for the logical Skill. Use typed entries such as repository, documentation, registry, package, or source.
  • metadata.triggering: optional structured trigger rules.

Do not put machine-local paths, generated snapshots, local sync state, or per-copy timestamps in SKILL.md.

Registry records

Generated registry records should capture environment-specific audit state:

  • skill_urls: canonical URLs collected from metadata.urls, CLI arguments, registry data, or upstream sources.
  • role_urls: role-specific URLs for physical copies, such as a local repository remote, project repository, external source page, or bundled plugin address.
  • roles: absolute local paths for physical copies, such as repo, local, project, and external.
  • digest: SHA-256 content digest for each copy or published artifact.
  • created_at and updated_at: audit timestamps for groups, versions, digests, and operations.
  • version_history: observed versions with their first and latest observed times, digests, roles, URLs, and content update times.
  • differences_by_role: changed-file summaries for synchronization or upgrade operations.

If a role URL is not explicitly configured, infer it from git remote get-url origin when the Skill copy is inside a Git repository.

Time inference

When a timestamp is missing, infer it in this order:

  1. Existing registry or explicit metadata value.
  2. Git commit history for the Skill path: first commit for created_at, latest commit for updated_at.
  3. File modification time for non-ignored Skill files.
  4. Current UTC time.

Always record how an inferred content timestamp was derived, for example git, filesystem, manual, or registry. Use timestamps for auditability only; use digests to decide whether two copies are identical.

Version differences

When recording or reporting differences between Skill versions or linked copies, report:

  • added files;
  • removed files;
  • modified text files, preferably with unified diffs when requested;
  • modified binary files by path and digest only.

Prefer snapshot-to-snapshot comparisons for historical versions. Use snapshot-to-current comparisons when deciding whether an unsynchronized local copy should become the source.

CLI (Planned)

The project-level CLI is planned to manage the complete Skill lifecycle:

skills create <name>
skills list
skills info <name>
skills search <query>
skills validate [name|--all]
skills test [name|--all]
skills link <name> --adapter codex
skills install <source>
skills update <name>
skills uninstall <name>
skills version <name> <major|minor|patch|version>
skills build [--adapter codex]
skills pack <name>
skills publish <name>
skills mcp serve

Custom Skill commands use an isolated namespace:

skills run <skill-name> <command> [args]

This avoids collisions between different Skills and between Skill commands and project management commands.

MCP Server (Planned)

The MCP server shares packages/core with the CLI and is planned to provide:

  • Resources: Skill directory, metadata, versions, and read-only instructions.
  • Prompts: reusable prompts for creating, validating, and upgrading Skills.
  • Management tools: search, validate, install, upgrade, and build Skills.
  • Skill tools: custom capabilities registered by trusted Skills through extensions.yaml.

Management tools use the skills__<action> namespace. Skill tools use <skill-name>__<tool-name>. The first version should use local stdio transport. Remote Streamable HTTP should be enabled only after authentication and origin restrictions exist.

Agent Build Adapters

Adapters are available now through the generic builder:

python3 scripts/agent_build.py --list
python3 scripts/agent_build.py --check
python3 scripts/agent_build.py codex
python3 scripts/agent_build.py dsh
python3 scripts/agent_build.py workbuddy
python3 scripts/agent_build.py workbuddy-ai

The builder scans platforms/ instead of using a hard-coded Agent list. A new Agent with repository-wide defaults therefore adds one platforms/<agent>/ directory. Existing Skills need a matching agent-builds/<agent>/ only when they require an exception.

Codex Adapter

The Codex adapter builds portable source content into a standard plugin artifact:

dist/codex/
|-- .codex-plugin/
|   `-- plugin.json
|-- .agent-build.json
|-- skills/
|   `-- <skill-name>/
|       |-- SKILL.md
|       |-- agents/openai.yaml
|       |-- scripts/
|       |-- references/
|       `-- assets/

The Codex plugin has its own artifact version, and the Codex adapter has its own version. Neither replaces or automatically bumps the independent version of each portable Skill. The plugin shape follows the official OpenAI plugin documentation.

Versioning And Releases

The required Versioning Policy uses MAJOR.MINOR.PATCH: PATCH for compatible fixes and small optimizations, MINOR for compatible new capabilities, and MAJOR for breaking changes with migration evidence. Small fixes must not increase MAJOR. Advance the selected level once per release, by one or more, and reset lower levels. Behavior-neutral documentation and repository maintenance need no component bump. CI enforces version formats, increments, and changelog declarations with python3 scripts/version_guard.py --base <PR-base>; compatibility claims still require review. Version validation applies now; packaging and publishing automation below remain planned. The default-branch-version workflow also validates the entire before/after change after a push or merge to the default branch, allowing only unchanged versions or same-level upgrades, including skipped numbers, with lower parts reset.

  • The single source of truth for a Skill version is metadata.version in SKILL.md.
  • .changes/ records the affected Skill, bump level, and change summary.
  • Skill release tags use skill/<skill-name>/v<version>.
  • Generated registry records include version, source, and SHA-256 content digest.
  • Each platforms/<agent>/adapter.json maintains the adapter version and its generated artifact version.
  • Adding or changing Agent support does not bump metadata.version unless the portable Skill behavior also changes.
  • Published artifacts are stored as immutable copies under <skill-name>/<version>; source directories do not duplicate historical versions.

Security And Trust

  • Documentation-only Skills do not receive code execution permissions automatically.
  • Remote executable extensions are disabled by default.
  • Before enabling an extension, show its source, version, digest, entrypoints, and permissions.
  • MCP tools that mutate state should require user approval by default.
  • Installation and upgrade should validate schema, paths, and digests before atomic replacement.
  • Secrets must not be written into Skills, registries, or build artifacts.

Roadmap

  1. Complete repository docs, architecture design, and implementation plan.
  2. Define SKILL.md frontmatter, skillset.yaml, extensions.yaml, and registry schemas.
  3. Implement packages/core and Skill validation.
  4. Implement the project-level CLI and custom Skill command SDK.
  5. Implement the local MCP server and Skill tool registration.
  6. Extend declarative Agent builds with installation and registry publishing.
  7. Implement independent versioning, packaging, and publishing.

References

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages