[Workflow] Advanced Claude Code Tips for Terminal Users: Custom Commands, Scripting, and Context Management

Selected Workflow

Advanced Claude Code Tips for Terminal Users: Custom Commands, Scripting, and Context Management

Workflow value: 90/100
Status: active · Freshness: 70/100 · Confidence: 0.95 · Level: intermediate
Categories: Quality Control, Context & Memory, Debugging, CLAUDE.md
Original source: r/ClaudeAI post/comment

What problem this solves

Enhancing efficiency, context management, and scripting capabilities when using Claude Code, especially for terminal users. Addresses issues like 'wandering' repos, multi-line copy/paste, and the need for headless scripting.

Summary

A collection of advanced tips and commands for Claude Code users, focusing on terminal efficiency, customizability, and better context management, derived from community consensus.

Why it is useful

This comment provides a concise, community-validated summary of several practical tips for enhancing Claude Code usage, particularly for terminal-centric developers. It covers customization, scripting, and common pain points like context management and copy/paste, making it highly valuable for improving developer efficiency and workflow.

Workflow

  1. Use claude -p "prompt" --output-format stream-json for a 'headless mode' to script around Claude and observe its output.
  2. Create custom slash commands by dropping markdown files into the .claude/commands/ directory.
  3. Quickly edit persistent CLAUDE.md instructions within a session using the /memory command.
  4. Improve Claude's file finding and reduce 'wandering' by using an indexer (e.g., cymbal) or setting up an LSP server plugin.
  5. Fix multi-line command copy/paste issues by using /copy, pbcopy, or explicitly telling Claude to put output on one line.
  6. Utilize /btw for 'by the way' comments, /add-dir to add directories, ! for file mentions, and @ for file mentions (desktop app) for efficient interaction.

Tools / artifacts

  • claude CLI tool
  • stream-json output format
  • .claude/commands/ directory
  • Markdown files for custom commands
  • CLAUDE.md
  • /memory command
  • cymbal (indexer)
  • LSP server plugin
  • /copy command
  • pbcopy (or equivalent clipboard tool)
  • /btw command
  • /add-dir command

Validation signals

  • Community overwhelmingly agrees with the tips.
  • Consensus that /btw is underrated.
  • Many users were 'blown away' by /add-dir, !, and @.
  • Power-users shared additional 'gems' in comments.

Limitations

  • The advice to 'poke' Claude if it's thinking for 15 minutes is vague and not a concrete workflow step.
  • Some tips (e.g., setting up an LSP server plugin) are brief and may require users to research further implementation details.
  • As a summary, some original context or detailed explanations from the discussion might be missing.

Rate this workflow

Upvote this post if the workflow is useful, reproducible, or worth recommending.

Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.

Reply if it worked for you, failed, is outdated, or has a better alternative.


This post was generated automatically from the workflow library database.

Posted May 13, 2026, 6:28 PM UTC

10
Loading comments…