ArticleOctober 12, 2025Free to read

Building Workflows with Claude Code: Sub-agent + Slash Commands

The new Sub-agents feature in Claude Code, combined with the existing custom commands feature, can fully implement workflows. Add in various MCP tools and Claude Code’s own very powerful core, and I feel like my workflow needs can be fully met here.

Original video in Chinese.

Key Takeaway

  • Workflow building: Claude Code uses Sub-agents + custom commands to implement workflows (such as a generate-review-modify loop), no n8n required; configured in the .claude folder (agents/commands).
  • Demo example: post-creator generates a post, post-reviewer reviews and scores it, repeating until >90 points or 3 rounds; run with /x + link, output as a Markdown file.
  • Expansion advantage: you can switch models (such as Kimi K2) to improve quality (slower but more authentic); it generalizes to non-programming tasks, with great potential, and is worth trying.

I had still been thinking about building workflows with n8n. Now it seems there may not be much need for that.

The new Sub-agents feature in Claude Code, combined with the existing custom commands feature, can fully implement workflows. Add in various MCP tools and Claude Code’s own very powerful core, and I feel like my workflow needs can be fully met here.

In this video, I’ll use a simple example to show everyone exactly how it’s implemented. And also whether it can still run if we switch the Claude model to Kimi K2.

This is a new project I created. In the root directory, you can see the .claude folder. After expanding it, you can see:

The Setting JSON file defines which tools can be used and which cannot. You can think of it as tool permission management.

The Agents folder contains two Markdown files. Each file corresponds to one Agent. I previously had Claude help me generate these two:

One is post-creator. Its job is to take the web link I provide, extract the content from it, and then generate a 200- to 300-word post based on that content.

The other is post-reviewer. Its job is to review post-creator’s content and give a score along with the reasons for that score.

These two Agents are very simple—one does the work, one checks it. So how do you get them to work together according to my plan? This is where the custom commands feature comes in.

Still inside the .claude folder, there is a commands folder. I created this folder manually. The x.md file inside it was also created by me. Its purpose is to define how the whole workflow should proceed. I designed five steps:

Step 1: Use post-creator to generate the post.

Step 2: Use post-reviewer to review the post, assign a score, and give an explanation.

Step 3: Feed post-reviewer’s feedback to post-creator, and have post-creator revise the post.

Step 4: Repeat steps 1 through 3, up to three times. Continue until post-reviewer gives a score above 90.

Step 5: Save the final version of the post into the root directory, in Markdown format.

This whole process is a very classic workflow. Input, generation and review repeated, then output at the end. Anyone who has used Coze, Dify, and the like will definitely be familiar with it.

Starting this workflow is very simple: enter /x, then a space, and add the link. This is a completed run of the workflow, so everyone can take a look.

After receiving the request, Claude Code still first understands the intent and generates a to-do list, which already includes what our workflow means, a total of four tasks.

Then post-creator starts up and begins generating content. After that, post-reviewer comes in to score it. The first round only got 78 points. So, according to the prior design, since it didn’t reach 90, it went back to regenerate.

It ran like this for three rounds, and the score reached 87 points. Although it still didn’t hit the target of 90, it had already used up all three rounds, so it had to stop and produce the final output.

A new md file appears in the root directory, and inside it is the content of the post.

But, to be honest, the post generated by the Claude model was really mediocre. I wasn’t very satisfied. So I thought: what would happen if I switched the model to Kimi K2?

This is another test I did. I used Claude Code Router to switch the model to K2. Then I copied over the entire .claude folder. So, with the same Sub-agents and the same custom commands, I ran the same question again.

The whole process was pretty much the same as before. The biggest difference is that it’s slower. This is mainly due to Moonshot’s official servers. But it still ran through successfully. And the content it generated was so much better. Look, it even uses clickbait-style writing. This is the advantage of domestic models. For content creation, it really feels more authentic.

Through the demo just now, what I want to tell everyone is:

First, Claude Code is not just for programming. You can see that it works perfectly fine for other kinds of work too. That’s what I meant earlier when I said it can generalize to other fields. You can switch the model to one from another vendor as needed, like the K2 I demonstrated, to improve content quality.

Second, Claude Code can also implement workflow orchestration. In a workflow, you can merge individual nodes, or several nodes, and replace them with Sub-agents. Then, through custom commands, you chain all the Sub-agents together into a complete workflow.

Right now, most people still think of Claude Code as something for programming. Not many people have seen its potential yet. I recommend everyone watch the video and give it a try to experience it for yourselves.

OK, that’s all for this episode. If you want to learn about AI, want to become a super individual, and want to find like-minded people, come join our newtype community. See you next time!