dayuanjiang/pecofence/pecofence-cli
Claude Code and agent skill by dayuanjiang/pecofence
- community
Checking that the SKILL.md file is still in the repository.
Configure PecoFence (Windows desktop fences) from the terminal: list/create/move fences, move and rename desktop icons using file metadata, per-fence options, global settings, auto-sorting rules, layout snapshots. Use when the user asks to organise their desktop icons or change PecoFence settings.
Install
npx vskill@latest install dayuanjiang/pecofence/pecofence-cliSKILL.md
pecofence-cli
pecofence-cli drives the PecoFence app already running on the user's Windows desktop. Every command prints JSON (except log). pecofence-cli <command> --help shows the flags with an example; pecofence-cli describe is the full catalog and describe --schema FenceDto|Settings|Cond the exact shapes. This file is enough to start; open describe only for something not covered here. Not for: installing PecoFence, editing its config.json (the app owns it), or files outside the desktop and portal folders.
Five rules
- Snapshot first. Before bulk changes run
snapshot save before-<task>, keep.snapshot.idand
tell the user pecofence-cli snapshot restore <id> undoes the layout. Snapshots hold layouts only (fences, geometry, membership), never settings, rules or files.
- Portals are real folders. A fence with
"kind": "portal"shows a folder on disk;item move
into or out of it moves the real files (undo only via Explorer). Run such a move with --dry-run first and show the user the fileMove entries and their destination. Pair --glob with --from.
- Address by id. After
fence list, use ids (or a unique prefix of 6+ hex digits), not titles.
The desktop fence is always inbox, whatever its localised title (Desktop, 桌面, ...).
- Ask for less.
--fields id,title,rect,fitkeeps only those keys (dotted paths, lists
element-wise); a full fence is ~700 bytes. If your reader decodes stdout with a legacy code page (Python without encoding="utf-8" on a CJK system, Windows PowerShell 5), add --ascii.
- Exit codes. 0 ok. 1 the app refused, or part of a batch failed: stderr has
{"error": {"code", "message", "hint", "details"}}, follow hint. 2 usage. 3 not running: ask the user to start PecoFence; never fall back to editing files. 4 timeout: a PecoFence menu or dialog is open, ask the user to close it, then check fence list before retrying (it may have run).
Start
Not on PATH (portable ZIP)? Call the exe by its full path, e.g. %LOCALAPPDATA%\Programs\PecoFence\pecofence-cli.exe.
Items carry kind (folders, programs, installers, shortcuts, documents, images, music, video, archives, namespace, other), ext, size, modified / created (Unix seconds), openCount, lastOpened, shortcutTarget, shortcutArguments, path and assignedBy. Sort by these; open a file only when name and kind say nothing. Two shortcuts are duplicates only when target and arguments match.
Reading replies
- Mutations return
{"changed": bool, ...}plus the affected object;changed: falsemeans it was
already so. A warning next to a success means something secondary failed or was skipped: report it.
snapshotIdappears when the app took a snapshot on its own first:fence deleteof a fence with
items, rule apply that moves items, item move of 20+ desktop items, snapshot restore.
- Coordinates are physical px in virtual-screen space (monitors left of the primary have negative x).
A tab (tabHost set) reports its host window's rect; skip tabs when checking overlaps.
fit: {columns, rows, fittingHeight, overflow}:overflow: truemeans the fence scrolls. When the
app changes a rect on its own (auto height, whole-row snapping, size limits) the reply carries adjusted: {requested, applied, reason}: continue from applied.
Cheat-sheet
Details that bite
- Quoting: values are parsed as JSON, else taken as text, so
48,true,listneed no quotes.
Quote what the shell would eat: "#ff8800" (in Git Bash # starts a comment), [, *, spaces, and monitor ids such as "\\.\DISPLAY2". Negative numbers work bare (--x -1800).
- Portal moves reply
fileMove: truebefore the files arrive; moved files get new ids, so list the
fence again before addressing them. A name that already exists at the destination is skipped (skipped + warning), never overwritten. A portal navigated into a subfolder reports portal.current, and moves to it land there. --glob without --from never takes portal items.
item renamerenames on disk; keep the extension unless the user asked otherwise.- Tabs share their host's window:
fence move/resizeon a tab isunsupported,--allskips
tabs, fence fit works only on the tab currently shown. Address the host, or fence detach first.
- Rules: the first match wins, and new desktop items are filed by them as they arrive. A rule cannot
target a portal and needs at least one condition.
config import/backup restorereplace settings, rules and layouts:config exportfirst.- The CLI cannot delete files: list duplicates and junk for the user to remove.
Recipes
Tidy a messy desktop
Report what you grouped and why.
Keep new desktop files sorted: add rules; new desktop items are filed as they land. Files in other folders (Downloads) are only visible through a portal, and rules do not act on portals. For decisions a rule cannot express, a script can block on pecofence-cli watch --fence inbox --events item.added --once (exits with the event), then run one batch and wait again.
Restyle every fence
AGENTS.md snippet
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/pecofence-cli/SKILL.md
Popularity
- Repository stars
- 386
- Repository forks
- 22
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dayuanjiang/pecofence/pecofence-cli)