perforce/p4mcp-server/p4-file-operations
Claude Code and agent skill by perforce/p4mcp-server
- community
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-operationsSKILL.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
| Action | Purpose | Key Parameters | |
|---|---|---|---|
content | Get file content at a revision | file_path | |
history | Get revision history (filelog) | file_path, max_results | |
info | Get file metadata (type, size, head revision) | file_path | |
metadata | Get extended file metadata | file_path | |
diff | Compare file revisions or depot vs workspace | file_path, file2, diff2 | |
annotations | Get per-line blame/annotation | file_path | |
search | Search for files by name pattern (wildcard) | file_path, pattern, max_results | |
grep | Search for files by content pattern | file_path, pattern, case_insensitive, max_results |
Modifying Files
| Action | Purpose | Key Parameters | |
|---|---|---|---|
add | Mark a new file for add | file_paths, changelist | |
edit | Open an existing file for edit | file_paths, changelist | |
delete | Mark a file for delete (requires approval) | file_paths, changelist | |
move | Move/rename a file | source_paths, target_paths, changelist | |
revert | Revert opened files to depot version | file_paths | |
reconcile | Reconcile workspace with depot (detect offline edits) | file_paths | |
resolve | Resolve file conflicts after integration | file_paths, mode | |
sync | Sync files from depot to workspace | file_paths, force |
Common Workflows
Edit and submit a file
modify_changelists→createa pending changelistmodify_files→editto open the file in the changelist- Make your changes locally
modify_changelists→submitto commit
Add new files
modify_changelists→createa pending changelist- Create the file(s) locally in your workspace
modify_files→addto mark them for addmodify_changelists→submit
Investigate file history
query_files→historyto see revision logquery_files→diffto compare specific revisionsquery_files→annotationsto see per-line authorshipquery_files→contentto read a specific revision
Find files by name or content
query_files→searchwith a wildcard pattern (e.g.,*.py) to find files by namequery_files→grepwith a text pattern to find files containing specific content- Use
query_files→contentto read files found from search results
Sync and resolve conflicts
modify_files→syncto get latest from depot- If conflicts exist,
modify_files→resolveto handle them modify_changelists→submitwhen resolved
Reconcile offline edits
- Make changes outside of P4 (e.g., IDE edits without opening files first)
modify_files→reconcileto detect and open changed files
Best Practices
- Always open files for
editbefore modifying them so changes are tracked. - Use
reconcileif you forgot to open files first — it detects offline edits, adds, and deletes. - Use
diffto verify changes before submitting. - Use
annotationsto understand who last changed each line (useful for debugging). - Specify
changelistwhen 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
- SKILL.md in the repositoryCheckingskills/p4-file-operations/SKILL.md
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
[](https://verified-skill.com/skills/perforce/p4mcp-server/p4-file-operations)