Self-Iteration: Let Agent Skill Automatically Modify Rules and Code in Conversation

Introduction

When using Agents with Skills (such as Cursor or Claude Code) for extended periods, a common practice is to manually write or modify SKILL.md, scripts, and reference files. When conversations reveal missing rules or inconvenient steps, users often have to interrupt their current task to modify the Skill themselves before retrying. The “Self-Iteration” Skill introduced below addresses these specific pain points: it transforms “optimizing the Skill itself based on conversation” into a triggerable, closed-loop process, while minimizing the risk of breaking the Skill during failures.

What is this

“Self-Iteration” is a SkillHub community Skill with the coordinates @user_29dc410e/lobster-self-iteration. The current version is v1.0.1, categorized under ai-agent, with the tag requires_api_key=false (no separate API Key configuration required). It is published by user_29dc410e (listed as author super paul on the SkillHub page) and sourced from the community.

In one sentence: It performs rule iteration, code snippet replacement, periodic reviews, and scoring-driven secondary optimization on the current Skill within an Agent session, while retaining backup and recovery capabilities. It solves the issues of high Skill maintenance costs and the disconnect between optimization and usage scenarios; it is not meant to replace the initial design phase of writing a Skill from scratch.

Core Features

The official introduction summarizes the capabilities into four points, covering the main path from rule modification to implementation changes and long-term operation.

Automatic Rule Iteration

Rules are adjusted based on the current conversation scenario and are forced into effect on the Skill side. This reduces the occurrence of “writing new rules but the Agent still following old habits.”

Automatic Code Modification

The AI generates optimized code snippets and automatically replaces them in relevant Skill files. The official description states this requires no manual line-by-line pasting; however, whether it is truly hands-off depends on your Agent tool permissions and diff confirmation strategy settings.

Closed-Loop Automatic Iteration

An automatic review and optimization is triggered every 20 rounds of conversation. This is suitable for continuously refining the same Skill during long sessions without having to manually command “optimize again” every time.

Iteration Scoring System

It quantifies the quality of a single iteration using a 1–10 score; low scores trigger secondary optimization, helping to reduce the risk of “making a change that actually makes things worse.”

Stability and Observability

It includes built-in code backup and fault tolerance: if optimization fails, it automatically recovers, reducing the probability of the Skill becoming unusable due to a single erroneous replacement. It provides 7 core commands (officially listed as including: Self-Iterate, Continue Iteration, Stop Iteration, View Iteration Rules, etc.), allowing switching between fully automatic and manual control; iteration history and score records are traceable.

Installation and Activation

The installation method provided on the SkillHub page is to let the Agent install this Skill according to the official installation documentation. The documentation URL and coordinates are as follows.

Please install @user_29dc410e/lobster-self-iteration based on https://skillhub.cn/install/skillhub.md.

The steps below are organized according to general SkillHub installation instructions; since the skills directory varies by client, you must use --dir to point to the directory actually recognized by your current Agent during installation. Otherwise, it defaults to ./skills/ and may not be loaded.

  1. Check if SkillHub CLI is installed:
command -v skillhub && skillhub --version
  1. If not installed, run the full installation (CLI + default Skill):
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash

If you only need the CLI:

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash -s -- --cli-only
  1. Install this Skill to the corresponding directory (replace <skills directory> with the path for your current environment):
skillhub install user_29dc410e/lobster-self-iteration --dir <skills directory>

Common path references (from SkillHub installation documentation):

  • Cursor: ~/.cursor/skills/
  • Claude Code: ~/.claude/skills/
  • Codex: ~/.codex/skills/ or .agents/skills/ under the project

If the Agent does not recognize the new Skill immediately after installation, restart or refresh the Skills cache according to your client’s instructions. The official page does not separately list specific configuration differences between Cursor and Claude Code; aside from the directory, unverified fields are not expanded upon.

Typical Usage

The materials do not provide complete conversation scripts, but the reproducible entry points are the 7 core commands and the closed-loop rhythm. It is recommended to use them as needed in a session where this Skill is installed:

Intent Reference Trigger (Consistent with official naming)
Single optimization of current Skill Use “Self-Iteration” related commands
Continuous refinement in long sessions Use “Continue Iteration”; auto-review also triggers every 20 rounds by default
Pause automatic changes Use “Stop Iteration”
Check currently active rules Use view-type commands like “View Iteration Rules”

After installing the Skill via the steps above, run a round of “Self-Iteration” on a test project or copy first, then check if the iteration history and scores are within the expected range; if the score is low, observe whether it automatically enters secondary optimization. For first-time use in a production directory, it is recommended to confirm that the backup and recovery behavior meets your audit requirements.

Use Cases and Notes

Who it is for: Developers who frequently adjust the same Skill repeatedly within the same session; teams willing to let the Agent modify Skill code snippets (under controllable permissions) to tighten rules based on conversation.

Limitations and Notes:

  • Automatic code changes alter Skill behavior. You must rely on the built-in backup and recovery, and retain version control (e.g., git) on important repositories; official materials do not replace your code review process.
  • The “every 20 rounds” closed loop may rewrite the Skill multiple times in long conversations. If you do not want it changed midway, use “Stop Iteration” or disable continuous iteration commands.
  • Scoring and secondary optimization are quality guardrails and cannot replace your judgment on business correctness.
  • SkillHub statistics (as of page display): Rating 100000, Downloads 16471, Installs 185; sourced from the community, upgrades and behavior changes are subject to the v1.0.1 description on SkillHub.

Conclusion

“Self-Iteration” brings Skill maintenance back into the conversation flow from “stopping to manually change files”: rules take effect forcibly, code can be replaced automatically, long sessions allow periodic reviews, and evolution risks are suppressed via scoring and recovery mechanisms. If you wish to verify the introduction and installation prompts via official channels, visit:

  • SkillHub Page: https://www.skillhub.cn/skills/user_29dc410e/lobster-self-iteration
  • API Entry: https://api.skillhub.cn/user_29dc410e/lobster-self-iteration
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye