deck editor

    1

    Transactional file editing with atomic operations, dry-run previews, and revision-tracking via Deck MCP.

    Free

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    deck editor

    Example session with this skill installed

    Replace the calculate function on lines 10-12 in src/math.py with a new version that returns 42. Use the revision hash a1b2c3d4e5f6.

    • Read your context and instructions
    • Compiled the deck editor

    I will replace the function in src/math.py using a transactional deck to ensure the edit is applied to the correct file version.

    File Update: src/math.py

    @APPLY a1b2c3d4e5f6
    @REPLACE 10-12
    def new_calculate():
        return 42
    @END
    

    Response from Deck MCP:

    APPLIED successfully
    REV: b2c3d4e5f6a1b2c3 (new)
    Operations applied:
    - REPLACE lines 10-12 (3 lines replaced with 2 lines)
    

    Next steps

    1. Run deck_get on src/math.py for lines 10-11 to verify the new content.
    2. Execute your test suite to ensure the logic change didn't break dependencies.
    3. Save the new revision hash b2c3d4e5f6a1b2c3 for any subsequent edits.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Editing large files via LLM often leads to truncated code or hallucinated line numbers. This skill provides a transactional editing interface using the Deck MCP server, ensuring file modifications are atomic and revision-aware.

    What it does

    • Atomic Operations ensures that multi-line edits either succeed entirely or fail without partial writes.
    • Revision Tracking uses unique hashes to prevent overwriting concurrent changes or applying edits to stale context.
    • Dry-run Preview allows verification of complex diffs before committing changes to disk.
    • RegEx Substitution enables sed-style pattern replacement across specified line ranges.
    • Conflict Detection identifies version mismatches and out-of-range addresses to prevent file corruption.

    How it works

    1. Read and Sync by calling deck_get to retrieve the current file content and its unique revision hash.
    2. Construct Deck by defining operations like REPLACE, DELETE, or INSERT targeting specific line numbers.
    3. Validate with @DRY to receive a preview diff of the proposed changes.
    4. Commit using @APPLY with the matching revision hash to write changes to the filesystem.

    Frameworks & tools

    This skill requires the Deck MCP server. It integrates with standard development workflows using ripgrep or ast-grep for initial target discovery.

    Why this beats prompting it yourself

    Standard prompting relies on the LLM to rewrite entire files or provide search-and-replace blocks that often fail on indentation or repetitive code. This skill enforces a strict grammar with revision checks, making it impossible to accidentally corrupt a file due to stale context.

    Use cases

    • Refactoring large functions where only specific line ranges need modification.
    • Automating bulk text replacements across files using regex patterns.
    • Appending log entries or configuration lines to the end of existing files.
    • Safe insertion of decorators or shell variables that use reserved characters.

    Known limitations

    Does not validate language-specific syntax after editing. Requires an active Deck MCP server connection and valid revision hashes for all apply operations.

    Requires Deck MCP server. Does not validate code syntax. Revision hashes are mandatory for existing file edits. Multi-operation decks must manually recompute line shifts.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 6 days ago

    • Free with an Agensi account

    Requires

    Python
    Git

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Network Access
    Environment Variables
    Listed6 days ago

    What's inside

    Frequently Asked Questions

    Standard LLM editing often results in truncated code or incorrect line offsets. This skill uses the Deck MCP server to perform atomic, transaction-based edits with revision hashes, ensuring changes are only applied if the file matches the expected state.

    The skill requires a connection to a Deck MCP (Model Context Protocol) server. It is compatible with any AI agent or IDE (like Claude Desktop or Cursor) that supports the MCP standard for external tool integration.

    A 'revision hash' is a unique identifier generated during the read phase. By requiring this hash during the commit phase, the skill ensures that if a file was modified by another process in the background, the edit will safely fail rather than overwriting new changes.

    Yes, the skill includes a dry-run feature (@DRY) that allows the agent to preview a diff of the proposed changes. This lets you verify the logic and line placement before any data is actually written to your local filesystem.

    While the tool ensures structural integrity and prevents corruption, it does not currently perform language-specific linting (like checking for Python indentation or JavaScript syntax errors). We recommend running your standard build or linting tools after the edit is committed.

    New in LLM Ops