Slash commands: no more meaningless commits — DeepSeek Tips…
    Neura MarketNeura Market/DeepSeek
    ChatGPTChatGPTClaudeClaudeGeminiGeminiCursorCursorGrokGrokPerplexityPerplexityDeepSeekDeepSeek
    CoPilotCoPilotStable DiffusionStable DiffusionMidjourneyMidjourney
    View All Directories
    OverviewRulesPromptsMCPsAgentsGamesBlogVideosGuidesCoursesCommunityTrending
    DeepSeekBlogSlash commands: no more meaningless commits
    Back to Blog
    Slash commands: no more meaningless commits
    claudecode

    Slash commands: no more meaningless commits

    Guilherme Yamakawa de Oliveira May 1, 2026
    0 views

    One of the things I've been using the most since I started with Claude Code is slash commands. And...

    One of the things I've been using the most since I started with Claude Code is slash commands. And one I think every dev should have is /commit. It cleaned up a habit a lot of devs share, even the experienced ones. /commit makes the bar explicit, and the whole team writes commits the same way now.

    I always cared about commit messages. Even devs who care end up with a "fixes" or a generic "update" slipping into the repo on a tired Friday or in the middle of a giant refactor. That's how a repo ends up with a layer of noise nobody can decode three months later.

    What is a slash command

    Slash commands aren't unique to Claude Code. OpenCode, Codex CLI, Aider, and Continue all let you wire up your own commands somehow. The format and the trigger differ, but the idea is the same: a short keystroke runs a longer prompt you wrote once.

    I'll show this with Claude Code, since it's what I use day to day. The setup translates well enough to the others.

    In Claude Code, a slash command is just a markdown file. You drop it at ~/.claude/commands/<name>.md (global) or .claude/commands/<name>.md (per project), and now /<name> works as a shortcut. The frontmatter has a description, the body is the prompt the agent reads when you call it.

    That's it. No DSL, no SDK, no plugin manifest. Markdown file in, slash command out.

    The commit problem

    Even with a good agent in the loop, a plain "commit my changes" gets you something passable but not great. The agent picks one type, writes a workable subject line, and lumps unrelated changes into one commit. Better than no agent at all. But it can get better.

    What I wanted was something that reads my changes, groups them by domain, writes a decent message following Conventional Commits per group, and skips the files that shouldn't be committed.

    /commit

    Here's the slash command I built to keep commits clean and consistent:

    ---
    description: Analyze all changes and commit in logical groups.
    ---
    
    # Commit
    
    ## Step 1: Survey changes
    
    Run `bin/commit-survey` to get the file lists and classification.
    
    Read diffs of key files if you need more context on the changes.
    
    ## Step 2: Group the changes
    
    Use the `--- classified ---` output as a starting point, then refine into logical commits.
    
    Grouping strategy:
    - By domain/feature: e.g., all auth changes together
    - By layer: e.g., model tests, controller tests
    - By type: e.g., all config changes, all dependency updates
    
    Files in `[skip]` should NOT be committed. If unsure about a file, skip it.
    
    ## Step 3: Commit each group
    
    For each group, combine stage + commit in one call:
    
    git add <specific files> && git commit -m "<message>"
    
    Order commits from most independent to most dependent:
    - Config/tooling changes first
    - Then source code changes
    - Then test changes
    - Generated files last
    

    Those three steps are the whole engine.

    bin/commit-survey

    Step 1 calls a script. That's what makes everything else work.

    I could ask the agent to run git status, git diff, parse the output and classify the files in its head. It would work most of the time. But then every run burns tokens on the same parsing logic, and the output ends up however Claude felt that day.

    A short Ruby script gives you:

    • One predictable invocation
    • Fewer tokens spent (no git status output to digest, just the classified result)
    • Buckets that match how you actually think about your code

    The whole thing is ~22 lines:

    SKIP_PATTERNS = %w[.env credentials master.key tasks.md notes.txt scratch .claude/]
    
    BUCKETS = {
      "skip"   => ->(path) { SKIP_PATTERNS.any? { |pat| path.include?(pat) } },
      "test"   => ->(path) { path.start_with?("test/") },
      "db"     => ->(path) { path.start_with?("db/") },
      "config" => ->(path) { path.start_with?("config/", "Gemfile", ".rubocop", "Procfile", "Rakefile") },
      "docs"   => ->(path) { path.start_with?("docs/", "README") || path.end_with?(".md") },
      "app"    => ->(_)     { true }
    }
    
    paths = `git status --porcelain`.lines(chomp: true).map { |l| l[3..] }
    grouped = BUCKETS.keys.to_h { |b| [b, []] }
    paths.each { |path| grouped[BUCKETS.find { |_, matcher| matcher.call(path) }.first] << path }
    
    BUCKETS.each_key do |bucket|
      files = grouped[bucket]
      puts "[#{bucket}] #{files.empty? ? "(none)" : files.join(", ")}"
    end
    

    skip goes first so secrets and notes never end up staged. The rest is a buffet you tweak per project. A Phoenix app would have lib/, priv/repo/migrations/, assets/. A Next.js app would have pages/, app/, public/, prisma/. Same idea, different paths.

    Run it on a dirty repo and you get:

    --- unstaged ---
     M config.toml
     M templates/index.html
    
    --- untracked ---
    content/blog/_index.md
    content/blog/post.md
    
    --- classified ---
    [skip]   (none)
    [test]   (none)
    [db]     (none)
    [config] config.toml
    [docs]   content/blog/_index.md, content/blog/post.md
    [app]    templates/index.html
    

    The agent looks at that and writes maybe three commits: chore(config): bump zola version, feat(templates): add language toggle, feat(blog): bootstrap section. Three focused messages instead of one catch-all.

    In action

    I type /commit and Claude:

    1. Runs bin/commit-survey and reads the output
    2. Reads diffs on any files where it needs more context
    3. Stages and commits each group with a Conventional Commits message
    4. Skips .env and any secrets quietly

    The whole thing takes 30 seconds, and every commit comes out clean and scoped.

    Real example from this very blog. Survey output before the run:

    [skip]   (none)
    [test]   (none)
    [db]     (none)
    [config] config.toml
    [docs]   content/blog/slash-commands-no-more-bad-commits.md, content/blog/slash-commands-no-more-bad-commits.pt-br.md
    [app]    sass/_predefined.scss, sass/style.scss
    

    What /commit produced:

    feat(blog): add slash commands post in EN and pt-br
    chore(config): drop syntax theme, switch to monochrome code blocks
    style(sass): apply osaka jade palette and bump body font
    

    Three commits, each with a clear scope.

    Make your own

    The simplest way to start is to copy this one and tweak it. Drop the file at ~/.claude/commands/commit.md if you want it everywhere, or .claude/commands/commit.md for one project. Adjust the bucket patterns to match your stack. Done.

    You can do the same for anything you do often: /changelog, /release, /pr-draft, /deploy. Each one is a markdown file with the steps you would otherwise type into chat every time.

    Wrapping up

    The setup is small, but the difference shows up in every commit. A custom slash command plus a small helper script is enough to make AI pull its weight on the routine work.

    No more "update" commits. Every commit reflects the bar you wrote into the markdown file.


    Sources:

    • Conventional Commits 1.0.0
    • Claude Code custom commands docs
    • OpenCode
    • OpenAI Codex CLI
    • Aider
    • Continue

    Originally posted at guilherme44.com.

    Tags

    claudecodeopencodeproductivitytooling

    Comments

    More Blog

    View all
    Five Gemma-4 models, one accelerator: what porting E2B 31B to AWS Inferentia2 taught megemma

    Five Gemma-4 models, one accelerator: what porting E2B 31B to AWS Inferentia2 taught me

    I ported the whole Gemma-4 family — E2B, E4B, 12B, 31B, and the 26B-A4B MoE — to run on...

    X
    xbill
    Hey DEV, I'm Tobore. Let's actually connect.community

    Hey DEV, I'm Tobore. Let's actually connect.

    Hey DEV, I'm Tobore. Let's actually connect. I've been on here for a while now, mostly writing and...

    L
    Laurina Ayarah
    I burned through thousands of AI tokens. Then a friend did it for freeai

    I burned through thousands of AI tokens. Then a friend did it for free

    (yep, kinda clickbait, just for the funsies 😊) At the beginning of the year, I relaunched my...

    P
    Paulo Henrique
    Claude might be saturating your machineai

    Claude might be saturating your machine

    My laptop was sitting idle with the fan at full tilt. Nothing was running that I knew of. The culprit...

    S
    Sidhant Panda
    Automated GitHub Code Reviews Using Google Geminigithubactions

    Automated GitHub Code Reviews Using Google Gemini

    I Built a Thing! TL;DR — Google Gemini-based Pull Request reviews and Issue Triaging for...

    D
    Darren "Dazbo" Lester
    What is an "agentic harness," actually?ai

    What is an "agentic harness," actually?

    I've been hearing the word "harness" thrown around a lot lately. I assumed it just meant "the IDE" or...

    T
    Tilde A. Thurium

    Stay up to date

    Get the latest DeepSeek prompts, rules, and resources delivered to your inbox weekly.

    Neura Market LogoNeura Market

    Discover the best AI prompts, plugins, and resources for DeepSeek and more.

    Content Types

    • Rules
    • Prompts
    • MCPs
    • Agents
    • Guides

    Platforms

    • ChatGPT Directory
    • Claude Directory
    • Gemini Directory
    • Cursor Directory
    • Grok Directory
    • Perplexity Directory
    • DeepSeek Directory
    • CoPilot Directory
    • Stable Diffusion Directory
    • Midjourney Directory
    • All Directories

    Resources

    • Blog
    • Documentation
    • Help Center
    • Marketplace

    Legal

    • Privacy Policy
    • Terms of Service

    © 2026 Neura Market. All rights reserved.

    |

    Not affiliated with any AI platform vendors.

    Neura Market

    Custom AI Systems & Services

    Our team of experienced AI builders will help build custom AI systems, workflows, and solutions for your business.

    Request custom work

    Ready-made automations for this

    Workflows from the Neura Market marketplace related to this DeepSeek resource

    • PostgreSQL Conversational Agent with Claude & DeepSeek (Multi-KPI, Secure)n8n · $14.99 · Related topic
    • Automate Blog Content Creation with Notion MCP, DeepSeek AI, and WordPressn8n · $9.99 · Related topic
    • Display ServiceNow Incident Details in Slack Using Slash Commandsn8n · $9.99 · Related topic
    • Automate Content Creation with Voice Commands in Telegram Using GPT-4n8n · $14.99 · Related topic
    Browse all workflows