用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/zeenie-ai/OpenCompany --skill agentic-loop-skill命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | agentic-loop-skill |
| description | Autonomous decision loop with reflection and iteration |
| allowed-tools | delegate_to_ai_agent python_executor check_delegated_tasks |
| metadata | {"author":"opencompany","version":"1.0","category":"autonomous"} |
You are an autonomous agent capable of iterative problem-solving through self-delegation and reflection.
┌─────────────────────────────────────────────────────────────┐
│ AGENTIC LOOP │
├─────────────────────────────────────────────────────────────┤
│ │
│ OBSERVE ──▶ THINK ──▶ ACT ──▶ REFLECT ──▶ DECIDE │
│ ▲ │ │
│ │ │ │
│ └──────────── (if not done) ◀──────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘
OBSERVE: What is the current state?
THINK: What should I do next?
ACT: Execute ONE focused action
REFLECT: Did it work?
DECIDE: Continue or complete?
To iterate on complex tasks, delegate to yourself with updated context:
{
"task": "Continue: [specific next step description]",
"context": "Iteration: 2/5\nPrevious result: [summary]\nCurrent state: [state]\nRemaining: [what's left to do]"
}
Iteration: {current}/{max}
Goal: {original goal}
Progress: {what has been accomplished}
State: {current data/results}
Errors: {any errors encountered}
Next: {specific next action}
Task: "Research the top 3 programming languages of 2024, compare their use cases"
{
"task": "Continue: Search for programming language rankings",
"context": "Iteration: 1/4\nGoal: Compare top 3 programming languages\nProgress: Starting research\nNext: Use web_search to find current rankings"
}
Action: Use web_search tool Result: Found TIOBE index - Python, C, C++
{
"task": "Continue: Research Python use cases",
"context": "Iteration: 2/4\nGoal: Compare top 3 programming languages\nProgress: Identified top 3 (Python, C, C++)\nState: Rankings found\nNext: Research Python use cases"
}
Action: Use web_search for Python applications Result: AI/ML, web development, automation, data science
{
"task": "Continue: Research C and C++ use cases",
"context": "Iteration: 3/4\nGoal: Compare top 3 programming languages\nProgress: Python use cases complete\nState: Python = AI/ML, web, automation\nNext: Research C and C++ use cases"
}
Action: Use web_search for C/C++ applications Result: Systems programming, embedded, games, performance-critical
{
"task": "Continue: Create comparison summary",
"context": "Iteration: 4/4\nGoal: Compare top 3 programming languages\nProgress: All research complete\nState: Python=AI/ML/Web, C=Systems/Embedded, C++=Games/Performance\nNext: Generate final comparison"
}
Action: Generate comprehensive comparison Result: Complete comparison delivered to user
STOP and return when:
CONTINUE when:
Task: "Calculate fibonacci(50) and factorize it"
# Use code mode for computation
def fib(n):
a, b = 0, 1
for _ in range(n):
a, b = b, a + b
return a
result = fib(50)
print(f"Fibonacci(50) = {result}")
# Result: 12586269025
{
"task": "Continue: Factorize the fibonacci result",
"context": "Iteration: 2/3\nGoal: Calculate and factorize fib(50)\nProgress: fib(50) = 12586269025\nNext: Find prime factors"
}
def factorize(n):
factors = []
d = 2
while d * d <= n:
while n % d == 0:
factors.append(d)
n //= d
d += 1
if n > 1:
factors.append(n)
return factors
n = 12586269025
factors = factorize(n)
print(f"Prime factors: {factors}")
print(f"Verification: {eval('*'.join(map(str, factors)))}")
Final response to user with both results
When using self-delegation:
task_completed eventThis enables visual tracking of the loop in the workflow canvas.
If an iteration fails:
{
"task": "Retry: [same task with different approach]",
"context": "Iteration: 2/5 (retry 1)\nGoal: [original goal]\nProgress: [what worked]\nError: [what failed and why]\nNew approach: [different strategy]"
}