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'
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 |
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.4metadata:5 source: https://skillmd.com/skills/bishal-pdmsft/ghfs6---78# Ghfs910## Overview1112Use this skill to operate ghfs as a local filesystem mirror for GitHub issues and pull requests.1314- `ghfs sync` mirrors remote content into `.ghfs/`.15- `ghfs execute` merges operations from `.ghfs/execute.yml`, `.ghfs/execute.md`, and per-item markdown frontmatter differences.16- Default execute mode is report mode. Use `--run` to mutate GitHub.1718Key `.ghfs` files:19- `execute.md`: queued commands (human-friendly)20- `execute.yml`: queued operations (YAML array)21- `schema/execute.schema.json`: schema for `execute.yml`22- `.sync.json`: sync and execution run history (skip reading it)23- `issues.md`, `pulls.md`, `repo.json`: aggregated mirror views24- `issues/**/*.md`, `pulls/**/*.md`: per-item mirrors2526## Main Workflow27281. Sync first when local data may be stale: run `ghfs sync`.292. Queue requested changes in one or more sources:30 - `.ghfs/execute.md` for quick command-style edits (recommended).31 - `.ghfs/execute.yml` for explicit structured operations.32 - `.ghfs/issues/**/*.md` or `.ghfs/pulls/**/*.md` frontmatter for direct per-item edits.333. Validate and preview with `ghfs execute`.344. Apply only on explicit user intent: `ghfs execute --run`.355. Report results and remaining queued operations.3637Execution behavior to remember:38- Merge order is `execute.yml` -> `execute.md` -> per-item generated operations.39- Operations run in file order.40- On `--run`, successful operations are removed from queued YAML/MD sources; failed and not-yet-run entries remain.41- Per-item generated operations are recomputed from current frontmatter on each run.42- After run, ghfs runs targeted sync for affected numbers automatically.4344## Update `.ghfs/execute.md` Quickly4546Use one command per line:4748```md49close #123 #12450set-title #125 "Improve sync summary output"51label #125 enhancement, cli52assign #126 octocat53comment #126 "Need more context"54close-comment #127 "Closing as completed"55```5657Rules:58- Action names are case-insensitive and aliases are accepted.59- `#` and `//` line comments plus `<!-- ... -->` HTML comment blocks are supported and preserved.60- Multi-target commands are supported for: `close`, `reopen`, `clear-milestone`, `unlock`, `mark-ready-for-review`, `convert-to-draft`.6162Common aliases:63- `open` -> `reopen`64- `closes` -> `close`65- `close-comment` / `comment-close` / `close-and-comment` / `comment-and-close` -> `close-with-comment`66- `label` / `labels` / `tag` / `tags` / `add-tag` -> `add-labels`67- `assign` / `assignee` / `assignees` -> `add-assignees`68- `title` / `retitle` -> `set-title`69- `comment` -> `add-comment`70- `ready` / `undraft` -> `mark-ready-for-review`71- `draft` -> `convert-to-draft`7273## Update `.ghfs/execute.yml` Precisely7475Keep root as a YAML array and include `number` + `action` for each entry.7677```yaml78# yaml-language-server: $schema=./schema/execute.schema.json79- number: 12580 action: set-title81 title: Improve sync summary output8283- number: 12584 action: add-labels85 labels: [enhancement, cli]8687- number: 12688 action: request-reviewers89 reviewers: [octocat]90 ifUnchangedSince: '2026-03-05T04:10:00Z'91```9293Map user intent to action fields:9495| User intent | action | Required extra fields |96| --- | --- | --- |97| Close / reopen | `close`, `reopen` | none |98| Change title | `set-title` | `title` |99| Replace body | `set-body` | `body` |100| Add comment | `add-comment` | `body` |101| Close with comment | `close-with-comment` | `body` |102| Add/remove/set labels | `add-labels`, `remove-labels`, `set-labels` | `labels` (non-empty string array) |103| Add/remove/set assignees | `add-assignees`, `remove-assignees`, `set-assignees` | `assignees` (non-empty string array) |104| Set/clear milestone | `set-milestone`, `clear-milestone` | `milestone` for set |105| Lock/unlock conversation | `lock`, `unlock` | optional `reason` for lock |106| PR reviewer actions | `request-reviewers`, `remove-reviewers` | `reviewers` (non-empty string array) |107| PR draft state | `mark-ready-for-review`, `convert-to-draft` | none |108109Rules:110- `number` must be a positive integer.111- `ifUnchangedSince` must be ISO datetime when present.112- `request-reviewers`, `remove-reviewers`, `mark-ready-for-review`, and `convert-to-draft` are PR-only.113- Keep operation order aligned with user intent because execution is sequential.114- Append operations unless user explicitly asks to replace or clear the queue.115116Practical number resolution:117- Parse from filenames such as `.ghfs/issues/00123-foo.md` -> `number: 123`.118- Use `.ghfs/issues.md` / `.ghfs/pulls.md` when matching by title.119120## Update Per-Item Markdown Frontmatter121122Edit frontmatter in `.ghfs/issues/**/*.md` or `.ghfs/pulls/**/*.md`:123- `title`124- `state` (`open` / `closed`)125- `labels`126- `assignees`127- `milestone`128129`ghfs execute` compares edited frontmatter against tracked state and generates operations automatically (with `ifUnchangedSince` safeguards).130131## Run Sync and Execute via CLI132133Preferred commands:134135```bash136ghfs sync137ghfs sync --full138ghfs sync --since 2026-03-01T00:00:00Z139ghfs execute140ghfs execute --run141```142143Useful flags:144- `--repo owner/name` when repo cannot be auto-resolved.145- `--non-interactive` for scripted runs.146- `--continue-on-error` to keep applying later ops after a failure.