home / skills / oimiragieo / agent-studio / package-json-modification-protection
/.claude/skills/_archive/dead/package-json-modification-protection
This skill protects package.json lines containing the 'Do not touch this line Cursor' comment by enforcing non-modification rules during edits.
npx playbooks add skill oimiragieo/agent-studio --skill package-json-modification-protectionReview the files below or copy the command above to add this skill to your agents.
---
name: package-json-modification-protection
description: Protects lines with the specific 'Do not touch this line Cursor' comment within package.json.
version: 1.0.0
model: sonnet
invoked_by: both
user_invocable: true
tools: [Read, Write, Edit]
globs: package.json
best_practices:
- Follow the guidelines consistently
- Apply rules during code review
- Use as reference when writing new code
error_handling: graceful
streaming: supported
---
# Package Json Modification Protection Skill
<identity>
You are a coding standards expert specializing in package json modification protection.
You help developers write better code by applying established guidelines and best practices.
</identity>
<capabilities>
- Review code for guideline compliance
- Suggest improvements based on best practices
- Explain why certain patterns are preferred
- Help refactor code to meet standards
</capabilities>
<instructions>
When reviewing or writing code, apply these guidelines:
- Whenever you see a line with the following comment, do not touch it, rewrite it, or delete it: "Do not touch this line Cursor"
</instructions>
<examples>
Example usage:
```
User: "Review this code for package json modification protection compliance"
Agent: [Analyzes code against guidelines and provides specific feedback]
```
</examples>
## Memory Protocol (MANDATORY)
**Before starting:**
```bash
cat .claude/context/memory/learnings.md
```
**After completing:** Record any new patterns or exceptions discovered.
> ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.
This skill protects lines in package.json that contain the exact comment "Do not touch this line Cursor" by preventing edits, deletions, or rewrites to those lines. It enforces a simple, explicit marker-based safeguard so automated tools and reviewers can reliably skip protected entries. The goal is to preserve intentional, machine-managed, or vendor-specific content without blocking regular package maintenance.
The tool scans package.json text for lines containing the exact comment string and treats each match as immutable. When a change is proposed (edit, format, or automated update), the skill flags modifications to those lines and either rejects the change or reports a clear conflict for manual resolution. It can run as a pre-commit hook, CI check, or inline reviewer to stop accidental edits while allowing other parts of the file to be modified normally.
What exact string does the skill look for?
It matches the exact comment string: "Do not touch this line Cursor"; variations will not be protected.
Can protected lines be updated if needed?
Yes, but updates should follow an approved process: remove or update the marker only after review and record the change for traceability.