perforce/p4mcp-server/p4-file-operations

Claude Code and agent skill by perforce/p4mcp-server

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

P4 file operations — query content, history, annotations, diffs, and modify files (add, edit, delete, move, sync, resolve) via P4 MCP tools. Use when: reading file content, viewing history, comparing revisions, adding or editing files, syncing, resolving conflicts, or reconciling workspace changes in P4.

Install

npx vskill@latest install perforce/p4mcp-server/p4-file-operations

SKILL.md

The same SKILL.md was published earlier as perforce/p4mcp-server/p4-file-operations.

File Operations

Use the query_files and modify_files tools to work with files in P4 depots.

Querying Files

ActionPurposeKey Parameters
contentGet file content at a revisionfile_path
historyGet revision history (filelog)file_path, max_results
infoGet file metadata (type, size, head revision)file_path
metadataGet extended file metadatafile_path
diffCompare file revisions or depot vs workspacefile_path, file2, diff2
annotationsGet per-line blame/annotationfile_path
searchSearch for files by name pattern (wildcard)file_path, pattern, max_results
grepSearch for files by content patternfile_path, pattern, case_insensitive, max_results

Modifying Files

ActionPurposeKey Parameters
addMark a new file for addfile_paths, changelist
editOpen an existing file for editfile_paths, changelist
deleteMark a file for delete (requires approval)file_paths, changelist
moveMove/rename a filesource_paths, target_paths, changelist
revertRevert opened files to depot versionfile_paths
reconcileReconcile workspace with depot (detect offline edits)file_paths
resolveResolve file conflicts after integrationfile_paths, mode
syncSync files from depot to workspacefile_paths, force

Common Workflows

Edit and submit a file
  1. modify_changelists → create a pending changelist
  2. modify_files → edit to open the file in the changelist
  3. Make your changes locally
  4. modify_changelists → submit to commit
Add new files
  1. modify_changelists → create a pending changelist
  2. Create the file(s) locally in your workspace
  3. modify_files → add to mark them for add
  4. modify_changelists → submit
Investigate file history
  1. query_files → history to see revision log
  2. query_files → diff to compare specific revisions
  3. query_files → annotations to see per-line authorship
  4. query_files → content to read a specific revision
Find files by name or content
  1. query_files → search with a wildcard pattern (e.g., *.py) to find files by name
  2. query_files → grep with a text pattern to find files containing specific content
  3. Use query_files → content to read files found from search results
Sync and resolve conflicts
  1. modify_files → sync to get latest from depot
  2. If conflicts exist, modify_files → resolve to handle them
  3. modify_changelists → submit when resolved
Reconcile offline edits
  1. Make changes outside of P4 (e.g., IDE edits without opening files first)
  2. modify_files → reconcile to detect and open changed files

Best Practices

  • Always open files for edit before modifying them so changes are tracked.
  • Use reconcile if you forgot to open files first — it detects offline edits, adds, and deletes.
  • Use diff to verify changes before submitting.
  • Use annotations to understand who last changed each line (useful for debugging).
  • Specify changelist when opening files to keep changes organized.
  • When moving files, both source and target must be in the same changelist.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
115
Repository forks
25
7-day trend score
24

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/perforce/p4mcp-server/p4-file-operations/badge)](https://verified-skill.com/skills/perforce/p4mcp-server/p4-file-operations)

Something wrong with this skill or its page? Tell us.