Logo Patch Md

Patch Md

Cộng đồng
Firstp1ck
patch-md

Agents should invoke this skill to create, migrate, inspect, apply, verify, or roll back versioned PATCH.md v2 lifecycle packages with machine-readable manifests, deterministic plans, drift detection, and transactional safety.

Tổng quan

Nhà phát hànhFirstp1ck
Kho mãpi-coding-agent-forge
Tên kỹ năngpatch-md
Sao
93
Bản fork
22
Tệp đi kèm
7
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 7 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được Firstp1ck công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Patch Md trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/Firstp1ck/pi-coding-agent-forge/tree/main/pi-skill-patch-md/skills/patch-md
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Firstp1ck/pi-coding-agent-forge.git /tmp/pi-coding-agent-forge
mkdir -p .claude/skills
cp -r /tmp/pi-coding-agent-forge/pi-skill-patch-md/skills/patch-md .claude/skills/patch-md
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Patch Md trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Patch Md ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Patch Md không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Patch MD Skill

When to Use

Use this skill to:

  • create or update a patch package;
  • migrate a legacy prose-only PATCH.md to schema v2;
  • inspect patch status after package updates;
  • plan, apply, verify, or roll back a patch;
  • reapply a patch across machines or package layouts.

Required v2 Artifact

A trusted patch package contains:

text
PATCH.md
patch.manifest.json
scripts/<lifecycle-handler>.mjs

Tests and fixtures are required for package-version or layout-dependent patches.

  • PATCH.md explains intent, scope, transformations, verification, rollback, and limitations.
  • patch.manifest.json is the machine-readable source of truth.
  • The lifecycle handler discovers actual runtimes and implements semantic, idempotent transformations.

Use PATCH-TEMPLATE.md, TOOL-CALL-SPEC.md, and patch-manifest-v2.schema.json.

App-specific package location

For an app-specific patch, the app's verified configuration/home directory is the canonical package location, normally <app-config>/patches/<patch-id>/.

  • Resolve the actual config/home from the app's documented runtime settings, launch options, or verified environment overrides before assuming a default. Ask when the location cannot be established safely.
  • Save the complete reconstructable package there: PATCH.md, manifest, lifecycle handlers, transformation profiles/assets, documentation, and required tests/fixtures. Do not deliver only a note that depends on a checkout, temporary capture, or versioned app-install directory.
  • A repository may retain a development mirror, but report the app-config package as the canonical artifact. Keep runtime assets package-relative and verify the copied package independently.
  • For T3 Code, use its resolved T3 home (T3CODE_HOME when configured, otherwise the verified ~/.t3 default), for example ~/.t3/patches/<patch-id>/. Keep patch artifacts outside live userdata; storing a patch never authorizes editing app settings or runtime state.
  • Do not silently move existing patches, receipts, or backups. Preserve their explicit state directory for rollback, and use --state-dir when a separately chosen config-local state directory is intended.
  • Patch storage is not patch application. After an app update, run fresh read-only status/plan and obtain plan-bound approval before any installed mutation; never silently reapply.

Lifecycle Commands

Resolve paths relative to this skill directory:

bash
node ./scripts/patch_md_extract.mjs --patch /path/to/PATCH.md --strict
node ./scripts/patchctl.mjs status --patch /path/to/PATCH.md
node ./scripts/patchctl.mjs plan --patch /path/to/PATCH.md
node ./scripts/patchctl.mjs apply --patch /path/to/PATCH.md --plan-hash <reviewed-hash>
node ./scripts/patchctl.mjs verify --patch /path/to/PATCH.md
node ./scripts/patchctl.mjs rollback --patch /path/to/PATCH.md --confirm

Workflow

Choose the lifecycle mode below from the user's request and current patch state. Always enter through strict extraction, use read-only status/plan before mutation, and finish with verification or an explicit blocker report.

Mode A — Create or Migrate

  1. Discover actual runtime entrypoints, package dependency graphs, and the verified app-config package destination when the target is an app.
  2. Define stable logical targets instead of user-specific absolute paths.
  3. Add package support ranges and semantic fingerprints.
  4. Implement three-way status: applicable, already-applied/upstreamed, or unsupported.
  5. Add idempotent transformation and postconditions.
  6. Add offline verification, receipt-based rollback, fixtures, and tests.
  7. Parse with strict mode and run the package test suite.

Legacy --no-strict parsing is allowed only to extract facts for migration. Never apply from legacy parser output.

Mode B — Status and Plan

  1. Run strict extraction; stop if ok=false.
  2. Run patchctl status.
  3. Run patchctl plan and review every required target, package version, path, before-hash, transformation, and risk.
  4. Do not proceed when a required target is unsupported or the plan reports drift.

Status and plan must be read-only.

Mode C — Apply

  1. Obtain explicit user approval for installed/global package mutation when not already requested.
  2. Apply only with the exact fresh plan hash.
  3. The handler must prepare and verify all target outputs before committing.
  4. Use sibling temporary files, restrictive backups, atomic rename, and automatic rollback on commit failure.
  5. Write a non-secret receipt with package versions and before/after hashes.
  6. Run offline verification against the exact runtime entrypoints.

Never silently reapply after an update.

Mode D — Verify

Verification must include, where applicable:

  • syntax/type checks;
  • semantic postconditions;
  • actual runtime/package resolution checks;
  • no-secret local protocol capture;
  • native TUI and RPC/WebUI variants;
  • a second apply producing zero writes.

Network, billing, credential, or live-provider checks must be separately identified and approved.

Mode E — Rollback

  1. Require --confirm.
  2. Load the apply receipt.
  3. Refuse rollback if a target no longer matches the recorded after-hash.
  4. Restore backups atomically.
  5. Verify restored before-hashes and archive the receipt.

Verification

After changing this skill or its runner, execute:

bash
npm run check --prefix <pi-skill-patch-md-package-root>

Before depending on a created or migrated patch, also run strict extraction, its fixture/unit tests, patchctl status, and offline patchctl verify. Run the Pi skill evaluator when available. Record any intentionally deferred network, billing, platform, or live-provider checks.

Parser and Manifest Requirements

Strict v2 validation requires:

  • every fixed heading exactly once and in canonical order;
  • contiguous unique Change indexes;
  • complete scope-to-change mapping;
  • recursive variable resolution with cycle detection;
  • complete shell fences preserved as blocks;
  • contained manifest and lifecycle handler paths;
  • valid v2 manifest fields, risk metadata, verification, and rollback.

Guardrails

  • Prefer upstream fixes or public extension/provider APIs over installed dist/ edits.
  • If dist/ mutation is unavoidable, resolve from actual executable/runtime entrypoints and fail closed on unknown layouts.
  • Never patch every matching package directory blindly.
  • Never log credentials, authorization headers, request bodies containing user content, or secret environment values.
  • Never execute verification prose as shell commands; use manifest argv steps or reviewed handler code.
  • Never claim implementation or verification without file and command evidence.
  • Never modify paths outside the reviewed plan.

Output Contract

Report:

  • patch ID/version and manifest path;
  • status or reviewed plan hash;
  • modified targets and before/after hashes;
  • verification results;
  • receipt or rollback archive path;
  • unsupported targets, deferred live checks, and restart requirements;
  • the canonical app-config package path and confirmation that all reconstruction files were saved and the copied package was verified (or the exact storage blocker).

Tệp đi kèm

Mô hình đọc các tệp này khi cần trong lúc kỹ năng được tải. Các tệp được cung cấp ở dạng có thể đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Patch Md làm được gì?

Agents should invoke this skill to create, migrate, inspect, apply, verify, or roll back versioned PATCH.md v2 lifecycle packages with machine-readable manifests, deterministic plans, drift detection, and transactional safety.

Vì sao nên dùng Patch Md trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Patch Md là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Patch Md trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/Firstp1ck/pi-coding-agent-forge/tree/main/pi-skill-patch-md/skills/patch-md. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Patch Md?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Patch Md với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Patch Md với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Patch Md có miễn phí không?

Có. Kỹ năng này được Firstp1ck phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇