Even Singer Hu Yanbin Uses AI to Code – 9 Proven AI Programming Efficiency Hacks

The article walks through practical AI‑coding productivity tricks—from picking the right model and trimming unnecessary output, to leveraging parallel agents, shortcut keys, slash commands, MCP integration, automation loops, reusable component libraries, and time‑management methods—showing how developers can dramatically speed up their workflow.

macrozheng
macrozheng
macrozheng
Even Singer Hu Yanbin Uses AI to Code – 9 Proven AI Programming Efficiency Hacks

Introduction

AI coding has become mainstream, with public figures like singer Hu Yanbin claiming to use "Vibe Coding" on the road. The author notes that many developers feel AI writes code quickly but overall development speed remains low because of small inefficiencies such as frequent copy‑pasting, repetitive prompts, and manual tasks.

1. Core Efficiency Techniques

Choose the Right Model

Not every task requires the most powerful (and expensive) model. The author recommends:

Simple tasks (code formatting, comments, trivial refactoring) – use Gemini Flash or GPT‑5 Mini.

Medium tasks (regular features, code review, small sites) – use GPT‑5 or Claude Sonnet.

Complex tasks (architecture design, hard bugs, large projects) – use Claude Opus or enable deep‑thinking.

Selecting an appropriate model improves speed and reduces cost, just as a CTO would not be asked to print documents.

Avoid Extra AI Output

AI often returns comments, documentation, and summaries that developers ignore. The author suggests explicitly telling the model to provide only core code, e.g.:

Only give me the core code, no comments, docs, or summary!

If the model does not comply, a "harsh" instruction can be added: Follow my instructions, no fluff. Or a humorous consequence:

If you output unnecessary content, a kitten will die.

These rules can be stored in an AGENTS.md file so the AI automatically follows them.

Parallel Agents

Modern AI coding tools (Claude Code, Cursor, Codex) support parallel agents. Cursor, for example, can run multiple models on the same task and let you pick the best result, effectively providing "cross‑validation" of AI solutions.

Example workflow:

Implement a complex feature – let Claude, GPT, etc., each propose a solution.

The underlying mechanism uses Git work‑trees: each agent works in an isolated directory, and results are merged back into the main repository.

Multi‑Instance Acceleration

Running several instances of an AI tool simultaneously can keep you productive while one instance is thinking. The author shares a Claude Code tip:

Open 5‑10 Claude tabs in the terminal, label them, and use system notifications to know which one needs input.

On the web UI, run multiple Claude sessions and use /background to send a session to the background, or /teleport to move a session between terminal and web.

For simple tasks a single instance suffices; multi‑instance is best for independent or long‑running tasks.

2. Shortcut Keys and Operations

Cursor Shortcuts

Cmd/Ctrl + I

– open Agent/Composer (multi‑file edit mode) Cmd/Ctrl + L – open Chat mode Cmd/Ctrl + K – inline edit to insert AI‑generated code Cmd/Ctrl + . or Ctrl + . – open mode menu (switch Agent/Ask/Plan) Cmd + / or Ctrl + / – cycle through AI models Shift + Tab – rotate between Agent modes Tab – accept AI suggestion Cmd/Ctrl + Shift + L – add selected content to chat context Alt + ↑/↓ – move current line Cmd/Ctrl + Shift + K – delete current line Cmd/Ctrl + Shift + F – global search Cmd/Ctrl + P – quick file open

VS Code Shortcuts

Alt + Click

– add cursor Cmd/Ctrl + Alt + ↑/↓ – add cursor above/below Cmd/Ctrl + Shift + L – add cursor to all matches Cmd/Ctrl + Click – go to definition Alt + ←/→ – navigate forward/backward Cmd/Ctrl + Shift + O – go to symbol F2 – rename symbol Cmd/Ctrl + . – quick fix

3. Slash Commands

Cursor Commands

/compress

– compress conversation to free context space. /create-rule – quickly create a project rule. /create-skill – create a custom skill.

Custom commands can be saved under .cursor/commands (project‑level) or ~/.cursor/commands (global).

Claude Code Commands

/compact

– compress context, optional /compact 重点保留 API 设计决策. /goal – set a final condition and let the AI loop until it is met, e.g.

/goal 修复整个项目的代码,直到全部测试通过且没有报错

. /plan – ask the AI to plan before coding. /background – send the session to the background. /review – run parallel sub‑agents to review code. /batch – split a large task into many sub‑tasks, each running in its own work‑tree.

These commands avoid writing long prompts each time and make the workflow smoother.

4. AI‑Enhanced Tools – MCP and Agent Skills

MCP (Model Context Protocol)

MCP, introduced by Anthropic and donated to the Linux Foundation’s Agentic AI Foundation, acts like a USB interface for AI, allowing tools such as ChatGPT, Claude, Gemini, Copilot, and Cursor to connect to external services uniformly.

Typical MCP servers:

GitHub MCP – AI can create repos, commit code, manage issues.

Filesystem MCP – read/write files, batch rename, search.

Puppeteer MCP – control browsers, take screenshots, crawl pages.

Postgres/MySQL MCP – run queries, analyze schema.

Context7 MCP – fetch latest official docs for up‑to‑date APIs.

Firecrawl MCP – fetch web content in real time.

Agent Skills

Agent Skills, also from Anthropic, let developers package complex workflows as a "skill" that the AI can load on demand. A skill is a folder containing a SKILL.md file describing what it does, when it triggers, and the execution steps.

Placement:

Project‑level: .cursor/skills/ or .claude/skills/ Global: ~/.cursor/skills/ or ~/.claude/skills/ Example: a frontend-design skill that automatically generates design‑rich UI components, or a /commit skill that creates a conventional Git commit message.

5. AI Automation

/goal Autonomous Loop

The /goal command lets the AI keep working until a concrete condition is satisfied. Use cases include:

API migration until the project compiles.

Batch refactor until each file is under a line‑count limit.

Bug fix until a specific test passes.

Set a timeout or iteration limit to avoid infinite loops, e.g.

/goal 迁移所有 API 调用到 v2 格式,直到测试通过,如果 20 轮还没搞定就停下来

.

Scheduled Automation

Commands like /loop 5m 检查项目部署状态 let the AI run periodic checks (deployment status, CI results, log anomalies).

Traditional Automation

npm scripts – define common commands in package.json (e.g., npm run lint:fix).

Git aliases – add shortcuts in ~/.gitconfig (e.g., git st for git status).

GitHub Actions – example workflow that checks out code, sets up Node, runs lint, tests, builds, and deploys to Vercel on pushes to main.

name: Deploy
on:
  push:
    branches: [main]
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '22'
      - run: npm install
      - run: npm run build
      - run: npm test
      - name: Deploy to Vercel
        run: vercel --prod
        env:
          VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}

6. Code Reuse and Modularity

Creating a personal component library (buttons, inputs, cards, modals, loaders) with clear props, customizable styles, and usage examples enables fast copying into new projects.

Utility functions (date formatting, debounce, ID generation, clipboard copy) can be stored in a utils.ts file. Example debounce signature (escaped):

export function debounce<T extends (...args: any) => any>(fn: T, delay: number): (...args: Parameters<T>) => void { /* … */ }

Snippets in VS Code (e.g., a React functional component template) can be triggered with a prefix like rfc and Tab. Maintain a personal code library directory structure for React, Node, etc., and copy needed parts when starting a new project.

7. Template Projects

For recurring project types, create a template repository (e.g., React + TypeScript + Tailwind) with predefined folder layout, common dependencies, config files ( tsconfig.json , package.json ), and a .cursor/rules folder. Next.js template includes app/ routes, .env.example for environment variables, and a README. Mark the repository as a GitHub "Template repository" so new projects can be created with a single click.

8. Prompt‑Template Library

Collect reusable prompt templates for common scenarios:

Feature development – outline requirements, tech stack, ask for analysis, component list, and core code.

Code review – request quality, performance, bug, and improvement analysis.

Debugging – provide problem description, error message, relevant code, and ask for cause and solution.

Performance optimization – share code and data scale, ask for bottleneck analysis and improvement plan.

Documentation – generate function/component docs with sections for purpose, parameters, return value, examples, and cautions.

Resources for ready‑made prompts include Fishskin AI resource navigation, Cursor Directory community rules, and GitHub's awesome-prompts collection.

9. Time‑Management Techniques

Pomodoro – 25 min focused work, 5 min break, longer break after four cycles.

Break large tasks into small, concrete subtasks (e.g., separate registration form, validation, API call, error handling).

Batch similar tasks (write all component skeletons together, then style them).

Prioritize MVP – get functionality working before polishing.

Regularly record workflow bottlenecks, adopt tools that truly save time, and learn from community streams, meet‑ups, or open‑source projects.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

AIautomationPrompt EngineeringProductivitycodingSlash commandsParallel Agents
macrozheng
Written by

macrozheng

Dedicated to Java tech sharing and dissecting top open-source projects. Topics include Spring Boot, Spring Cloud, Docker, Kubernetes and more. Author’s GitHub project “mall” has 50K+ stars.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.