p4-file-operations

p4-file-operations is a skill for Claude Code, Codex from perforce/p4mcp-server. It costs 76 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 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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 76 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.
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.00076 $0.00978
Opus 5 $0.00038 $0.00489
Sonnet 5 $0.00015 $0.00196
Haiku 4.5 $0.00008 $0.00098

Measured 7d ago against content hash c8c2a05224dd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 7d 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_changelistscreate a pending changelist
  2. modify_filesedit to open the file in the changelist
  3. Make your changes locally
  4. modify_changelistssubmit to commit

Add new files

  1. modify_changelistscreate a pending changelist
  2. Create the file(s) locally in your workspace
  3. modify_filesadd to mark them for add
  4. modify_changelistssubmit

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. 7d 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 (114 stars, last pushed 1mo ago), licensed MIT. It adds 76 tokens to every session and 978 once invoked, about $0.0004 per session on Opus 5. 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

Other skills, from other repositories

polish-docs-meta

Finalize documentation and project metadata for a ship-ready release. Use after implementation is complete, tests pass, and devcheck is clean. Safe to run at any stage — each step checks current state and only acts on what still needs work.

cyanheads/git-mcp-server · 53 tokens

work-item

Use when opening or rewriting a work item on any git-based SCM. Source-control agnostic; GitHub, GitLab, and Azure Boards are adapters only.

ShaftHQ/SHAFT_ENGINE · 35 tokens

github-via-nyxid

Operate a user's GitHub account through NyxID's credential-brokering proxy (service slug api-github) — read and write repositories, files, issues, pull requests, commits, branches, Actions, gists and anything else the GitHub REST API exposes, all on the user's behalf and without ever handling a raw token. NyxID…

ChronoAIProject/NyxID · 116 tokens

git-workflow

Git best practices for version control and collaboration.

athola/skrills · 12 tokens

memory-commit

Use when the user explicitly says "remember this", "save this", "ghi nho", "luu lai", "save for next time", or otherwise asks to persist the immediately preceding context. Captures with the appropriate contexttype (decision, preference, fact, skill, task, conversation) so future sessions can retrieve it accurately.

n24q02m/mnemo-mcp · 72 tokens

release-versioning

Discipline for release classification, version bumps, and changelogs, Conventional Commits classify the release range, SemVer computes the version from those commits, Keep a Changelog renders the result. Use when the user asks to cut a release, bump a version, write a changelog, decide if a change is a…

aethrox/doctrine · 84 tokens