Ghfs
Overview
Use this skill to operate ghfs as a local filesystem mirror for GitHub issues and pull requests.
ghfs sync mirrors remote content into .ghfs/.
ghfs execute merges operations from .ghfs/execute.yml, .ghfs/execute.md, and per-item markdown frontmatter differences.
- Default execute mode is report mode. Use
--run to mutate GitHub.
Key .ghfs files:
execute.md: queued commands (human-friendly)
execute.yml: queued operations (YAML array)
schema/execute.schema.json: schema for execute.yml
.sync.json: sync and execution run history (skip reading it)
issues.md, pulls.md, repo.json: aggregated mirror views
issues/**/*.md, pulls/**/*.md: per-item mirrors
Main Workflow
- Sync first when local data may be stale: run
ghfs sync.
- Queue requested changes in one or more sources:
.ghfs/execute.md for quick command-style edits (recommended).
.ghfs/execute.yml for explicit structured operations.
.ghfs/issues/**/*.md or .ghfs/pulls/**/*.md frontmatter for direct per-item edits.
- Validate and preview with
ghfs execute.
- Apply only on explicit user intent:
ghfs execute --run.
- Report results and remaining queued operations.
Execution behavior to remember:
- Merge order is
execute.yml -> execute.md -> per-item generated operations.
- Operations run in file order.
- On
--run, successful operations are removed from queued YAML/MD sources; failed and not-yet-run entries remain.
- Per-item generated operations are recomputed from current frontmatter on each run.
- After run, ghfs runs targeted sync for affected numbers automatically.
Update .ghfs/execute.md Quickly
Use one command per line:
close #123 #124
set-title #125 "Improve sync summary output"
label #125 enhancement, cli
assign #126 octocat
comment #126 "Need more context"
close-comment #127 "Closing as completed"
Rules:
- Action names are case-insensitive and aliases are accepted.
# and // line comments plus <!-- ... --> HTML comment blocks are supported and preserved.
- Multi-target commands are supported for:
close, reopen, clear-milestone, unlock, mark-ready-for-review, convert-to-draft.
Common aliases:
open -> reopen
closes -> close
close-comment / comment-close / close-and-comment / comment-and-close -> close-with-comment
label / labels / tag / tags / add-tag -> add-labels
assign / assignee / assignees -> add-assignees
title / retitle -> set-title
comment -> add-comment
ready / undraft -> mark-ready-for-review
draft -> convert-to-draft
Update .ghfs/execute.yml Precisely
Keep root as a YAML array and include number + action for each entry.
# yaml-language-server: $schema=./schema/execute.schema.json
- number: 125
action: set-title
title: Improve sync summary output
- number: 125
action: add-labels
labels: [enhancement, cli]
- number: 126
action: request-reviewers
reviewers: [octocat]
ifUnchangedSince: '2026-03-05T04:10:00Z'
- number: 130
action: add-reaction
reaction: heart
- number: 130
action: add-reaction
reaction: '+1'
target: {kind: comment, commentId: 9876543}
Map user intent to action fields:
| User intent |
action |
Required extra fields |
| Close / reopen |
close, reopen |
none |
| Change title |
set-title |
title |
| Replace body |
set-body |
body |
| Add comment |
add-comment |
body |
| Close with comment |
close-with-comment |
body |
| Add/remove/set labels |
add-labels, remove-labels, set-labels |
labels (non-empty string array) |
| Add/remove/set assignees |
add-assignees, remove-assignees, set-assignees |
assignees (non-empty string array) |
| Set/clear milestone |
set-milestone, clear-milestone |
milestone for set |
| Lock/unlock conversation |
lock, unlock |
optional reason for lock |
| PR reviewer actions |
request-reviewers, remove-reviewers |
reviewers (non-empty string array) |
| PR draft state |
mark-ready-for-review, convert-to-draft |
none |
| Add/remove a reaction |
add-reaction, remove-reaction |
reaction (one of +1, -1, laugh, hooray, confused, heart, rocket, eyes); optional target (defaults to the issue/PR body) |
Rules:
number must be a positive integer.
ifUnchangedSince must be ISO datetime when present.
request-reviewers, remove-reviewers, mark-ready-for-review, and convert-to-draft are PR-only.
- Keep operation order aligned with user intent because execution is sequential.
- Append operations unless user explicitly asks to replace or clear the queue.
Practical number resolution:
- Parse from filenames such as
.ghfs/issues/00123-foo.md -> number: 123.
- Use
.ghfs/issues.md / .ghfs/pulls.md when matching by title.
Update Per-Item Markdown Frontmatter
Edit frontmatter in .ghfs/issues/**/*.md or .ghfs/pulls/**/*.md:
title
state (open / closed)
labels
assignees
milestone
ghfs execute compares edited frontmatter against tracked state and generates operations automatically (with ifUnchangedSince safeguards).
Run Sync and Execute via CLI
Preferred commands:
ghfs sync
ghfs sync --full
ghfs sync --since 2026-03-01T00:00:00Z
ghfs execute
ghfs execute --run
Useful flags:
--repo owner/name when repo cannot be auto-resolved.
--non-interactive for scripted runs.
--continue-on-error to keep applying later ops after a failure.
1---2name: ghfs3description: Manages ghfs local mirror files in `.ghfs/`, especially translating user instructions into valid execute operations (`execute.md`, `execute.yml`, or per-item edits), running `ghfs execute` / `ghfs sync`, and validating issue/PR batch edits. Use when tasks involve editing issues/PRs through `.ghfs` artifacts, reconciling sync state, or applying queued GitHub operations.4---56# Ghfs78## Overview910Use this skill to operate ghfs as a local filesystem mirror for GitHub issues and pull requests.1112- `ghfs sync` mirrors remote content into `.ghfs/`.13- `ghfs execute` merges operations from `.ghfs/execute.yml`, `.ghfs/execute.md`, and per-item markdown frontmatter differences.14- Default execute mode is report mode. Use `--run` to mutate GitHub.1516Key `.ghfs` files:17- `execute.md`: queued commands (human-friendly)18- `execute.yml`: queued operations (YAML array)19- `schema/execute.schema.json`: schema for `execute.yml`20- `.sync.json`: sync and execution run history (skip reading it)21- `issues.md`, `pulls.md`, `repo.json`: aggregated mirror views22- `issues/**/*.md`, `pulls/**/*.md`: per-item mirrors2324## Main Workflow25261. Sync first when local data may be stale: run `ghfs sync`.272. Queue requested changes in one or more sources:28 - `.ghfs/execute.md` for quick command-style edits (recommended).29 - `.ghfs/execute.yml` for explicit structured operations.30 - `.ghfs/issues/**/*.md` or `.ghfs/pulls/**/*.md` frontmatter for direct per-item edits.313. Validate and preview with `ghfs execute`.324. Apply only on explicit user intent: `ghfs execute --run`.335. Report results and remaining queued operations.3435Execution behavior to remember:36- Merge order is `execute.yml` -> `execute.md` -> per-item generated operations.37- Operations run in file order.38- On `--run`, successful operations are removed from queued YAML/MD sources; failed and not-yet-run entries remain.39- Per-item generated operations are recomputed from current frontmatter on each run.40- After run, ghfs runs targeted sync for affected numbers automatically.4142## Update `.ghfs/execute.md` Quickly4344Use one command per line:4546```md47close #123 #12448set-title #125 "Improve sync summary output"49label #125 enhancement, cli50assign #126 octocat51comment #126 "Need more context"52close-comment #127 "Closing as completed"53```5455Rules:56- Action names are case-insensitive and aliases are accepted.57- `#` and `//` line comments plus `<!-- ... -->` HTML comment blocks are supported and preserved.58- Multi-target commands are supported for: `close`, `reopen`, `clear-milestone`, `unlock`, `mark-ready-for-review`, `convert-to-draft`.5960Common aliases:61- `open` -> `reopen`62- `closes` -> `close`63- `close-comment` / `comment-close` / `close-and-comment` / `comment-and-close` -> `close-with-comment`64- `label` / `labels` / `tag` / `tags` / `add-tag` -> `add-labels`65- `assign` / `assignee` / `assignees` -> `add-assignees`66- `title` / `retitle` -> `set-title`67- `comment` -> `add-comment`68- `ready` / `undraft` -> `mark-ready-for-review`69- `draft` -> `convert-to-draft`7071## Update `.ghfs/execute.yml` Precisely7273Keep root as a YAML array and include `number` + `action` for each entry.7475```yaml76# yaml-language-server: $schema=./schema/execute.schema.json77- number: 12578 action: set-title79 title: Improve sync summary output8081- number: 12582 action: add-labels83 labels: [enhancement, cli]8485- number: 12686 action: request-reviewers87 reviewers: [octocat]88 ifUnchangedSince: '2026-03-05T04:10:00Z'8990- number: 13091 action: add-reaction92 reaction: heart9394- number: 13095 action: add-reaction96 reaction: '+1'97 target: {kind: comment, commentId: 9876543}98```99100Map user intent to action fields:101102| User intent | action | Required extra fields |103| --- | --- | --- |104| Close / reopen | `close`, `reopen` | none |105| Change title | `set-title` | `title` |106| Replace body | `set-body` | `body` |107| Add comment | `add-comment` | `body` |108| Close with comment | `close-with-comment` | `body` |109| Add/remove/set labels | `add-labels`, `remove-labels`, `set-labels` | `labels` (non-empty string array) |110| Add/remove/set assignees | `add-assignees`, `remove-assignees`, `set-assignees` | `assignees` (non-empty string array) |111| Set/clear milestone | `set-milestone`, `clear-milestone` | `milestone` for set |112| Lock/unlock conversation | `lock`, `unlock` | optional `reason` for lock |113| PR reviewer actions | `request-reviewers`, `remove-reviewers` | `reviewers` (non-empty string array) |114| PR draft state | `mark-ready-for-review`, `convert-to-draft` | none |115| Add/remove a reaction | `add-reaction`, `remove-reaction` | `reaction` (one of `+1`, `-1`, `laugh`, `hooray`, `confused`, `heart`, `rocket`, `eyes`); optional `target` (defaults to the issue/PR body) |116117Rules:118- `number` must be a positive integer.119- `ifUnchangedSince` must be ISO datetime when present.120- `request-reviewers`, `remove-reviewers`, `mark-ready-for-review`, and `convert-to-draft` are PR-only.121- Keep operation order aligned with user intent because execution is sequential.122- Append operations unless user explicitly asks to replace or clear the queue.123124Practical number resolution:125- Parse from filenames such as `.ghfs/issues/00123-foo.md` -> `number: 123`.126- Use `.ghfs/issues.md` / `.ghfs/pulls.md` when matching by title.127128## Update Per-Item Markdown Frontmatter129130Edit frontmatter in `.ghfs/issues/**/*.md` or `.ghfs/pulls/**/*.md`:131- `title`132- `state` (`open` / `closed`)133- `labels`134- `assignees`135- `milestone`136137`ghfs execute` compares edited frontmatter against tracked state and generates operations automatically (with `ifUnchangedSince` safeguards).138139## Run Sync and Execute via CLI140141Preferred commands:142143```bash144ghfs sync145ghfs sync --full146ghfs sync --since 2026-03-01T00:00:00Z147ghfs execute148ghfs execute --run149```150151Useful flags:152- `--repo owner/name` when repo cannot be auto-resolved.153- `--non-interactive` for scripted runs.154- `--continue-on-error` to keep applying later ops after a failure.