Terminal Coding Assistant in Practice: Installation, MCP, and Skills Configuration

    A practical guide to setting up a terminal-based coding assistant like Claude Code. This article covers choosing an installation method, everyday workflows for reading code, editing files, and running commands, plus how to configure MCP for external data sources and Skills for enforcing team conventions. It also explains how to connect third-party models through a compatible gateway.

    1. Choosing an Installation Method

    A terminal coding assistant runs directly in your project directory, where it can read code, modify files, and execute commands. When choosing an installation method, the main considerations are your dependency environment and how quickly you want updates. Using Claude Code as an example, the common options are:

    Method Platform Prerequisites Updates Best For
    Native install script macOS, Linux, WSL No Node.js required Automatic Personal dev machines where you want the latest version as soon as possible
    PowerShell install Windows No Node.js required Automatic Windows personal dev machines
    Homebrew macOS Homebrew installed Manual upgrade command Teams standardizing on a package manager
    npm global install All platforms Node.js 18+ Manual upgrade No longer officially recommended; a fallback only

    On macOS or Linux, you can download the script first, review its contents, and then execute it—avoiding the risks of piping a remote script straight into a shell:

    1. curl -fsSL https://claude.ai/install.sh -o install.sh
    2. less install.sh
    3. bash install.sh

    After installation, confirm the version:

    1. claude --version

    Package managers may lag behind the native installer by a few hours to a day or two. If you need new features immediately, prefer the native installation. For teams that need a unified version, pin a specific version number and document it.

    2. Basic Usage: Reading Code, Editing Code, Running Commands

    Navigate to your project directory and start the assistant:

    1. cd ~/projects/order-service
    2. claude

    The first launch requires signing in to your account. It’s best to use the assistant only inside Git repositories: all changes can be reviewed with git diff, and you can roll back with Git if something goes wrong. Before starting, switch to a dedicated branch:

    1. git switch -c ai/parse-config-check

    Reading Code

    When picking up an unfamiliar project, ask questions in natural language:

    1. Where is this project's entry point? List the main call relationships between modules and summarize in three bullet points.

    The assistant will locate files and trace call chains on its own. If you already know the target file, providing the path directly makes navigation faster.

    Editing Code

    For example, to add argument validation to a function:

    1. Add type checking to the parseConfig function in src/utils/validate.ts.
    2. If the input is not an object, throw a TypeError. Explain your plan before making changes.

    If you want to review a plan before any files are touched, start in plan mode:

    1. claude --permission-mode plan

    In the default mode, the assistant shows a diff before every file write and waits for your confirmation. This step is key to controlling changes. Review the diff section by section before approving, paying close attention to deleted lines and newly added branching logic.

    If the result isn’t what you expected, simply restore the file:

    1. git restore src/utils/validate.ts

    Note that git restore discards uncommitted changes in the file—only run it when you’re sure the changes came from the assistant and don’t need to be kept.

    Running Commands

    1. Run the tests and list the failing cases with possible causes.

    The assistant determines which command to run based on files like package.json and Makefile. For frequently used commands, you can configure an allowlist in .claude/settings.json and block high-risk commands:

    1. {
    2. "permissions": {
    3. "allow": ["Bash(npm test)"],
    4. "deny": ["Bash(rm:*)", "Bash(git push:*)"]
    5. }
    6. }

    Team-wide rules belong in .claude/settings.json and should be committed to the repository. Personal preferences belong in .claude/settings.local.json, which should be added to .gitignore.

    Non-Interactive Mode and CI

    In scripts or pipelines, pass instructions with the -p flag; the assistant outputs the result and exits when done:

    1. claude -p "Explain the login flow in src/auth.ts, summarized in three bullet points"

    In CI, it’s best to allow only read-only tools and use JSON output for easier parsing:

    1. claude -p "Check whether this change contains unhandled exception branches" \
    2. --allowedTools "Read,Grep" \
    3. --output-format json

    Store the API key in your CI platform’s secret management and inject it as the ANTHROPIC_API_KEY environment variable—never hardcode it in scripts or commit it to the repository. Before going live, run the pipeline once against a test repository to confirm the output format and exit behavior behave as expected.

    3. MCP: Connecting External Systems

    MCP (Model Context Protocol) is an open protocol for connecting external data sources and tools. Teams commonly use it to link internal documentation, databases, or ticketing systems. Project-level configuration lives in .mcp.json at the repository root. The following example exposes a local documentation directory to the assistant as a read-only reference source:

    1. {
    2. "mcpServers": {
    3. "team-docs": {
    4. "command": "npx",
    5. "args": [
    6. "-y",
    7. "@modelcontextprotocol/server-filesystem",
    8. "/Users/you/team-docs"
    9. ]
    10. }
    11. }
    12. }

    Once configured, type /mcp in a session to check server status, or run claude mcp list to see registered servers.

    A few practical guidelines:

    • Least privilege: Only mount the directories a task actually requires. Filesystem servers usually provide both read and write tools—block the write tools in your permission configuration. Tool names follow the pattern shown in the /mcp output, such as mcp__team-docs__write_file.
    • Keep secrets out of files: For services requiring tokens, reference system environment variables with "env": {"DB_URL": "${DB_URL}"} rather than writing plaintext values into .mcp.json.
    • Verify external data: When the assistant modifies code based on documentation or database content, cross-check against the original source first.

    To revoke access, run claude mcp remove team-docs, or simply delete the corresponding block from .mcp.json.

    4. Skills: Turning Team Conventions into Reusable Capabilities

    Skills package your team’s practices into reusable instruction files. The assistant loads them automatically when a relevant task comes up, and you can also invoke them explicitly in a prompt. Project-level Skills live in the .claude/skills/ directory—one folder per skill, with SKILL.md as the entry point.

    Here’s an example of a commit message convention:

    1. mkdir -p .claude/skills/commit-style

    The content of .claude/skills/commit-style/SKILL.md:

    1. ---
    2. name: commit-style
    3. description: Use when generating or reviewing git commit messages, following the team's commit conventions.
    4. ---
    5. # Commit Message Convention
    6. 1. The title format is `type(scope): summary`, where type must be one of feat, fix, refactor, docs, test, or chore.
    7. 2. Keep the summary under 72 characters, use the imperative mood, and omit the trailing period.
    8. 3. The body explains the reason for the change and lists affected modules.
    9. 4. For breaking changes, describe the impact in the body starting with `BREAKING CHANGE:`.

    The description in the frontmatter determines when the assistant auto-loads the skill. Describing when it applies clearly matters more than writing something clever.

    Verification is simple. Stage some changes, then prompt:

    1. Generate a commit message for the staged changes and state which skill you used.

    If the generated title format and body structure match the convention, the skill is active. Commit skill files alongside your code—changes to them should go through review too. Personal skills can go in ~/.claude/skills/. Before installing a skill shared by someone else, read every file, especially any scripts, since a loaded skill can invoke tools you’ve authorized.

    5. Connecting Third-Party Models

    Claude Code uses the Anthropic Messages API protocol. If you’re running a privately deployed model or a model from another vendor, you’ll need a gateway compatible with this protocol to forward requests to the actual model. The following environment variables specify the gateway address and model name (the domain is an example only—replace it with your gateway’s real address):

    1. export ANTHROPIC_BASE_URL="https://llm.internal.example.com/anthropic"
    2. export ANTHROPIC_MODEL="your-model-id"

    Handle keys with extra care. The recommended approach is to read them from the system keychain or a team secrets manager and inject them into environment variables before starting a session, rather than writing them into configuration files. If you must put a key in a config file, only use .claude/settings.local.json, and confirm it’s listed in .gitignore. When troubleshooting, never print secrets to the terminal or logs with env or printenv.

    After connecting, verify in this order:

    1. Connectivity: run cla