p4-file-operations

p4-file-operations is a skill for Claude Code, Codex from perforce/p4mcp-server. It costs 0 tokens per session (978 once invoked), scanned A, original, MIT.

A set of procedures for working with files stored in a Perforce version-control system. It covers reading file contents, history, differences, and line annotations, plus adding, editing, deleting, moving, syncing, and resolving files.

In plain words
What is it for?
Use it to search for files or text, inspect metadata and revisions, compare versions, view annotations, sync a workspace, and prepare file changes for submission.
Why use it?
It gives an agent a consistent way to inspect changes and manage files through Perforce. That helps with reviewing revisions, finding who changed a line, updating files, and resolving conflicts.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to search for files or text, inspect metadata and revisions, compare versions, view annotations, sync a workspace, and prepare file changes for submission.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/perforce/p4mcp-server/p4-file-operations
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add perforce/p4mcp-server --skill p4-file-operations
Clone the repo
git clone --depth 1 https://github.com/perforce/p4mcp-server

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for p4-file-operations

README.md
[![agentmods](https://agentmods.dev/badge/skills/perforce/p4mcp-server/p4-file-operations/github.svg)](https://agentmods.dev/skills/perforce/p4mcp-server/p4-file-operations)
Your own site
<a href="https://agentmods.dev/skills/perforce/p4mcp-server/p4-file-operations"><img src="https://agentmods.dev/badge/skills/perforce/p4mcp-server/p4-file-operations/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for p4-file-operations

Your own site · 80×15
<a href="https://agentmods.dev/skills/perforce/p4mcp-server/p4-file-operations"><img src="https://agentmods.dev/badge/skills/perforce/p4mcp-server/p4-file-operations.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 978 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00978
Opus 5.5 $0.00000 $0.00391
Sonnet 5.5 $0.00000 $0.00196
Haiku 4.5 $0.00000 $0.00098

Measured 3mo ago against content hash c8c2a05224dd, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

p4-file-operations scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/p4-file-operations/SKILL.md · 84 lines

How it starts

The opening of the file, as written. The whole thing — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

  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

Read the full file on GitHub · 84 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 84 lines · 0 tokens per session scan A c8c2a05224dd

Subscribe to this mod's changes

p4-file-operations is a skill published in the GitHub repository perforce/p4mcp-server (127 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 978 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

p4-file-operations compared with skills from other repositories

p4-file-operations next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
p4-file-operationsperforce/p4mcp-serverSkill1271mo agoMITA0Claude Code, Codex
pull-request-authoringgithub/github-mcp-serverSkill35kyesterdayMITA62Claude Code, Codex
repository-content-changesgithub/github-mcp-serverSkill35kyesterdayMITA64Claude Code, Codex
deploy-runbooknirholas/three.wsSkill289todayApache-2.0A38Claude Code
github-via-nyxidChronoAIProject/NyxIDSkill43todayApache-2.0A116Claude Code
git-workflowmodelcontextprotocol/csharp-sdkSkill4.7kyesterdaynoneA19Claude Code, Codex
memory-journal-mcpneverinfamous/memory-journal-mcpSkill212d agoMITA83Claude Code, Codex