Patch Mdのロゴ

Patch Md

コミュニティ
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.

概要

公開者Firstp1ck
リポジトリpi-coding-agent-forge
スキル名patch-md
スター
93
フォーク
22
同梱ファイル
7
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 7個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    Firstp1ckがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルPatch MdをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/Firstp1ck/pi-coding-agent-forge/tree/main/pi-skill-patch-md/skills/patch-md
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをその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
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでPatch Mdを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にPatch Mdを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Patch Mdは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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).

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「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.

TypingMindでPatch Mdを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Patch Mdはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにPatch Mdをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/Firstp1ck/pi-coding-agent-forge/tree/main/pi-skill-patch-md/skills/patch-mdを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Patch Mdを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Patch Mdは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもPatch Mdを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Patch Md」は無料ですか?

はい。Firstp1ckがGitHubでMITライセンスの下で公開しています。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇