Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+22 more

    Safe Git Commit & PR

    2

    Manual git workflows often lead to inconsistent commit history, leaked secrets, or vague pull request descriptions that slow down code reviews.

    Free

    Security scanned
    Safe Git Commit & PR

    Safe Git Commit & PR

    Example session with this skill installed

    I've finished the login flow. Commit my changes and write the PR description for this branch.

    • Read your context and instructions
    • Compiled the safe git commit

    PROJ-142 login flow: commit and PR prep

    Branch: feature/PROJ-142-login-flow → main

    Gaps found in the diff

    The login route is never registered. src/auth/login.route.ts exports handleLogin, but src/server.ts only handles /health. So POST /api/v1/login, which the form calls, gets a 404.
    2.

    **Every login fails.** The route passes `async () => null` as `findUser`, so the user is never found and every attempt returns 401.
    3.
    

    The token is a placeholder. It's a base64 of id:timestamp with a TODO to switch to a signed JWT, so anyone could forge it. JWT_SECRET exists in .env but nothing uses it.
    4.

    Migration 003 isn't used. The code tracks attempts in an in-memory Map, so the count resets on restart, never expires, and isn't shared between instances. The login_attempts table is never written.
    5. Error handling:

    • Any error that isn't bad credentials, such as a DB failure, returns 429.
    • JSON.parse runs outside the try, so malformed JSON is never caught.
    • The form does nothing on success and doesn't catch network errors.
    • Locking out by email alone means anyone can lock out any account by sending 5 bad passwords.

    Decision: commit as work in progress (option a).

    Files

    FileDecision
    src/auth/auth.service.ts, src/ui/login-form.tsx, src/auth/login.route.tsCommit 2
    db/migrations/003_add_login_attempts.sqlCommit 3
    .gitignoreCommit 1 (adds .env*, dist/, *.log)
    .envNever committed (contains secrets); now ignored
    dist/, debug.logLeft out; now ignored
    CLAUDE.mdLeft out, per your decision

    Planned commits (each needs your OK before it runs)

    1. .gitignore (waiting for your OK)

    chore: ignore env files, build output and logs
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    

    2. Auth service, route and form

    feat(auth): add login endpoint and form submission (PROJ-142)
    
    Work in progress: the route is not yet registered in server.ts, the
    user lookup is stubbed, and the token is a placeholder until JWT
    signing is added.
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    

    3. Migration

    feat(db): add login_attempts table migration (PROJ-142)
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    

    PR description draft

    Follows .github/pull_request_template.md.

    
    ## Summary
    Adds the login flow for PROJ-142: the login service checks credentials and limits attempts, there is a `POST /api/v1/login` handler, and the login form submits to it. **Work in progress:** the endpoint is not reachable yet and does not issue real tokens (see Risks).
    
    ## Changes
    **Backend**
    - `auth.service.ts`: `login()` takes a `findUser` lookup, checks the password, and throws `InvalidCredentialsError` when they don't match. It blocks after 5 failed attempts per email (in-memory) and returns `{ token, user }`.
    - `login.route.ts`: new `handleLogin` handler. Returns 200 on success, 401 for bad credentials, 429 otherwise.
    
    **Frontend**
    - `login-form.tsx`: posts to `/api/v1/login` and shows an error alert when the request fails.
    
    **Database** (run in this order)
    1. `003_add_login_attempts.sql`: `login_attempts` table plus an `(email, attempted_at)` index. The code doesn't use it yet.
    
    ## How to test
    Not fully testable end-to-end yet: the route isn't registered, so `POST /api/v1/login` returns 404.
    - Unit-level: call `login()` with a stub `findUser`. Check that a correct password returns a token, a wrong one throws `InvalidCredentialsError`, and the 6th failure throws "Too many attempts".
    - UI: submit the form and check that the error alert appears.
    
    ## Risks / deploy notes
    - **Blocking before merge:**
      - `handleLogin` is not registered in `server.ts`.
      - `findUser` is stubbed to always return `null`.
      - The token is an unsigned placeholder (TODO: signed JWT using `JWT_SECRET`).
    - Attempt limiting is in memory: it resets on restart, never expires, isn't shared across instances, and lets anyone lock out any account by email. Migration 003 is meant to replace it.
    - Errors that aren't bad credentials (e.g. DB failures) return 429. Malformed JSON bodies aren't handled.
    - New env vars will be needed per environment: `JWT_SECRET`, `DATABASE_URL`.
    - Migration 003 adds a new table. Rolling back means dropping `login_attempts`.
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    

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

    About this skill

    Manual git workflows often lead to inconsistent commit history, leaked secrets, or vague pull request descriptions that slow down code reviews. This skill enforces a disciplined, safe process for local version control and PR drafting, ensuring your agent never performs destructive actions without your oversight.

    What it does

    • Enforces safety: Blocks destructive commands like git push, hard resets, or history rewrites to protect your remote repository.
    • Style matching: Analyzes git log to match the repository's existing commit message language, tone, and formatting conventions.
    • Secret detection: Scans staged changes for .env files, private keys, or credentials and halts the process if any are found.
    • Structured PR drafting: Generates formatted PR descriptions based on local diffs, following your .github/pull_request_template.md or a standard technical schema.
    • Ticket integration: Automatically extracts ticket keys from branch names or user input to link commits and PRs to your project management tool.

    How it works

    1. Inspection: The agent runs git status and git diff to understand staged and unstaged changes.
    2. Proposal: It proposes a commit message or a list of files to stage and waits for your explicit approval.
    3. Execution: Once confirmed, it runs git commit locally but stays on your machine, never pushing to origin.
    4. Drafting: It compares your branch against the target to write a detailed PR description including summary, changes, and testing steps.

    Frameworks & tools

    This tool works with any repository using git. It can optionally interface with the gh (GitHub) CLI to create draft pull requests if requested.

    Why this beats prompting it yourself

    Generic prompts often result in "Updated files" messages or hallucinated PR descriptions that ignore your project's specific template. This skill forces a multi-step check of actual logs and diffs while hard-coding safety guards that prevent the AI from ever force-pushing or leaking secrets.

    Use cases

    • Drafting standardized, professional commit messages for complex refactors.
    • Generating comprehensive PR descriptions for large feature branches that require migration notes.
    • Preventing accidental commits of build artifacts, logs, or sensitive environment variables.
    • Ensuring new developers follow repo-specific commit conventions without manual policing.

    Known limitations

    Does not support pushing code to remote branches or merging PRs. Requires the user to have git installed and initialized in the working directory.

    How to use

    Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free forever

    No account required to browse

    Trust & safety

    Security scanned

    Verified clean 2 days ago

    • Free to download with an account

    Requires

    Git

    Listed2 days ago

    What's inside

    Frequently Asked Questions