xiaohongshu
xiaohongshu
manage-files
Generic file I/O operations for plan directories
Full skill instructions
Generic file operations for plan directories. Provides basic CRUD operations for any file within a plan directory.
Activate this skill when:
Note: For typed plan documents (request.md, solution_outline.md), use pm-workflow:manage-plan-documents instead. For domain-specific files (config.toon, references.toon, status.toon), use the dedicated manage-* skills.
Files are stored in plan directories:
.plan/plans/{plan_id}/
request.md
solution_outline.md
config.toon
references.toon
status.toon
tasks/
Script: pm-workflow:manage-files:manage-files
Read file content from a plan directory.
python3 .plan/execute-script.py pm-workflow:manage-files:manage-files read \
--plan-id {plan_id} \
--file notes.md
Output: Raw file content (no wrapping)
Write content to a file in a plan directory.
python3 .plan/execute-script.py pm-workflow:manage-files:manage-files write \
--plan-id {plan_id} \
--file request.md \
--content "# Request Title
Task description with multiline content.
## Section
More content here..."
Parameters:
--plan-id (required): Plan identifier--file (required): Relative file path within plan directory--content: Content to write (mutually exclusive with --stdin)--stdin: Read content from stdin instead of --contentNote: The --content parameter supports multiline content. Do NOT use --stdin with shell heredocs or cat commands.
Output: Prints "Created: {path}" to stderr, exit code 0 on success
Remove a file from a plan directory.
python3 .plan/execute-script.py pm-workflow:manage-files:manage-files remove \
--plan-id {plan_id} \
--file old-file.md
Output: Confirmation message to stderr, exit code 0 on success
List files in a plan directory.
python3 .plan/execute-script.py pm-workflow:manage-files:manage-files list \
--plan-id {plan_id} \
[--dir subdir]
Output: Simple file listing, one per line
Check if a file exists.
python3 .plan/execute-script.py pm-workflow:manage-files:manage-files exists \
--plan-id {plan_id} \
--file config.toon
Output: Exit code 0 if exists, 1 if not
Create a subdirectory in a plan directory.
python3 .plan/execute-script.py pm-workflow:manage-files:manage-files mkdir \
--plan-id {plan_id} \
--dir requirements
Output: Confirmation message to stderr, exit code 0 on success
Create a plan directory if it doesn't exist, or reference an existing one. This is an atomic operation that replaces the two-step pattern of listing plans and checking for conflicts.
python3 .plan/execute-script.py pm-workflow:manage-files:manage-files create-or-reference \
--plan-id {plan_id}
Output (TOON format):
When plan is newly created:
status: success
plan_id: my-feature
action: created
path: /path/to/.plan/plans/my-feature
When plan already exists:
status: success
plan_id: my-feature
action: exists
path: /path/to/.plan/plans/my-feature
current_phase: refine
domain: java
Use case: Called by plan-init to atomically check/create plan directories.
Delete an entire plan directory. Used when user selects "Replace" for an existing plan during plan-init.
python3 .plan/execute-script.py pm-workflow:manage-files:manage-files delete-plan \
--plan-id {plan_id}
Output (TOON format):
On success:
status: success
plan_id: my-feature
action: deleted
path: /path/to/.plan/plans/my-feature
files_removed: 5
On error (plan not found):
status: error
plan_id: my-feature
error: plan_not_found
message: Plan directory does not exist: /path/to/.plan/plans/my-feature
Use case: Called by plan-init when user selects "Replace" to delete existing plan before creating new one. See pm-workflow:phase-1-init/standards/plan-overwrite.md for the full workflow.
| Script | Purpose | Usage |
|---|---|---|
pm-workflow:manage-files:manage-files | All file operations via subcommands | python3 .plan/execute-script.py pm-workflow:manage-files:manage-files {subcommand} --help |
base_path()--file accepts relative paths within plan dir (e.g., requirements/REQ-001.toon)read returns raw content; mutations return minimal status| Check | Validation |
|---|---|
| plan_id format | kebab-case, no special chars |
| file path | No .., no absolute paths |
| directory | Must exist (unless mkdir) |
| content | Non-empty for write |
status: error
plan_id: my-feature
file: nonexistent.md
error: file_not_found
message: File does not exist
suggestions[2]:
- Check file name spelling
- Use list subcommand to see available files
Domain-specific skills (manage-config, manage-references, manage-lifecycle) may use this skill for basic file operations, or import shared libraries directly.
Plan orchestration skills (plan-init, solution-outline, task-plan, plan-execute) use this skill for generic file I/O.
| Skill | Manages | Use manage-files for |
|---|---|---|
| manage-config | config.toon | N/A (use manage-config) |
| manage-references | references.toon | N/A (use manage-references) |
| manage-lifecycle | status.toon | N/A (use manage-lifecycle) |
| manage-plan-documents | request.md | N/A (use manage-plan-documents) |
| manage-solution-outline | solution_outline.md | N/A (use manage-solution-outline) |
| manage-tasks | tasks/*.toon | N/A (use manage-tasks) |
| manage-files | any other file | Generic read/write/list |
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience