شعار Agent Rsi

Agent Rsi

المجتمع
luoling8192
agent-rsi

Agent retrospective and self-improvement loop. Run at the end of any task that changed code, docs, config, pull requests, or deployments, and whenever a task failed, was redone, or the user corrected you. Records what worked and what failed, turns each failure into regression tests, an ADR, and a postmortem, counts repeated mistakes in agent-docs/ledger.md, and promotes repeated mistakes and proven methods into the right AGENTS.md. Triggers: "复盘", "总结经验", "postmortem", "retro", "RSI", "沉淀", or a Stop hook asking for a retrospective.

نظرة عامة

الناشرluoling8192
المستودعskills
اسم المهارةagent-rsi
النجوم
22
التفريعات
0
الملفات المرفقة
7
الترخيصMIT
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 7

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها luoling8192 على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Agent Rsi في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى الإضافات → المهارات.
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/luoling8192/skills/tree/main/plugins/agent-rsi/skills/agent-rsi
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات → المهارات → إضافة مهارة → من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/luoling8192/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/plugins/agent-rsi/skills/agent-rsi .claude/skills/agent-rsi
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Agent Rsi في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج Agent Rsi تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Agent Rsi بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تترتب أي تكلفة على المهارة غير المستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Agent RSI (retrospective → self-improvement)

Goal: each mistake happens at most twice. The first time it is recorded. The second time it becomes a rule that every agent loads.

Keep it small. A retrospective that takes longer than the task is waste. For a clean, routine task, step 1 is enough.

Where things go

The workspace is the directory the session started in: the one holding the top-level AGENTS.md for this work. Its agent-docs/ directory holds the ledger and shared lessons. The machine directory ~/agent-docs/ has the same layout and holds what every project on this host needs. If either directory does not exist when you need it, create it from templates/agent-docs-README.md and templates/ledger.md.

Lesson scope

Store each lesson where every session that needs it will read it:

Lesson aboutLocation
One repositoryThat repository's docs or AGENTS.md
One workspace (several repos)<workspace>/agent-docs/lessons/<topic>.md
Tools on this machine, a cluster or third-party service, or the user's preferences~/agent-docs/lessons/<topic>.md, with a pointer in the global rules
  • Do not store a lesson only in an agent's per-directory memory, such as Claude Code project memory. Sessions that start in another directory never see it.
  • Before you add to a workspace lesson, ask whether a session in another project needs it too. If it does, it belongs in ~/agent-docs/.
  • When you find a lesson at too narrow a scope, move it, and leave a one-line pointer in the old file.
ArtifactLocationWhen
Regression unit / integration testThe affected repo, next to the code, in the same PR as the fixEvery bug that reached a commit, review, CI, or production
ADR<repo>/docs/adr/NNNN-<slug>.mdA design choice that someone would later question or undo
Postmortem<repo>/docs/postmortems/YYYY-MM-DD-<slug>.md if repo-specific; agent-docs/postmortems/ if cross-repo or about agent processFailure that reached CI, a reviewer, the user, or production; or cost more than ~30 min
Shared lessonSee "Lesson scope"Knowledge another agent in another repo would also need
Counteragent-docs/ledger.md of the same scope as the lessonEvery failure, and every proven method
RuleSee "Rule scope" belowLedger count reaches 2, or a method proved itself twice

Templates are in templates/ next to this file. scripts/session-stats.py measures where session time went (see step 1). Repo files (tests, ADRs, repo postmortems, repo AGENTS.md) go through the task's branch and a PR, never a repo's main checkout.

Rule scope

ScopeFileExample
One repository<repo>/AGENTS.md"Read the drizzle migration before editing an Ent schema."
One workspace (several repos)Workspace AGENTS.md"Deploy backend before the dashboard change that depends on it."
Every project you work onGlobal rules: ~/AGENTS.md, loaded through ~/.claude/CLAUDE.md (@~/AGENTS.md) and ~/.codex/AGENTS.md"Work in a worktree; never edit the main checkout."

Start at the narrowest scope. Move a rule up one scope when the same lesson shows up in a second repository or workspace.

Put rules in these AGENTS.md files, never in a skill. A skill loads only when its description matches the task, but a rule must be in context before the mistake happens. A rule can point to a lesson file for the details.

Steps

1. Classify the outcome (always)

First measure the session. Do not rely on memory for what was slow:

sh
python3 -I <this skill>/scripts/session-stats.py --transcript <current transcript>

Claude Code transcripts are ~/.claude/projects/<cwd with / as ->/<session id>.jsonl. Codex transcripts are under ~/.codex/sessions/. With no --transcript, the script reads every transcript; add --since 1d to limit it.

The script pairs each tool call with its result and prints findings: command families that take a large share of time, calls that are never fast, slow calls, repeated commands, failures, polling loops, and denied calls. Treat each finding as a candidate slow or mistake row for step 2. A finding is evidence, not a root cause. Read the command and its output before you name a cause.

Limits of the numbers:

  • Times include permission checks and user approval.
  • Background calls and calls sent in one parallel batch have no time of their own.
  • The report shows command text. Copy conclusions into the ledger, never raw commands, hosts, or paths.

Then answer in two or three lines, for yourself:

  • What was the task, and did it succeed on the first try?
  • What went wrong, or took longer than it should? Count user corrections, failed CI runs, review rounds, reverted commits, wrong assumptions.
  • Root cause in one sentence. Ask "why" until you reach something a rule, a test, or a tool could have prevented. "I was careless" is not a root cause; "I edited the schema from memory instead of reading the migration" is.

If nothing went wrong and you learned nothing new, stop here.

2. Check the ledger

Re-read agent-docs/ledger.md right before you edit it; other sessions write to it too. Look for an existing row with the same root cause, even if the symptom differs.

  • Match: increment Count, update Last seen, append the new evidence.
  • No match: add a row with Count 1 and the next free ID (L-NNNN).

Log a time sink found in step 1 with type slow, for example "each remote exec pays 10 s of connection setup". Put the measured numbers in Evidence.

Also log successes that saved real time ("ran the tests locally before pushing and skipped a CI round trip") with type method. Methods are promoted the same way as mistakes.

3. Turn the failure into artifacts

Produce only what the failure warrants:

  • Tests. Write a test that fails before the fix and passes after. Prefer a unit test; add an integration test when the bug lived in a seam between components (DB mapping, resolver ↔ service, API contract, auth). Name the test after the behaviour, not the ticket. Run it.
  • ADR. Only when you made or reversed a design decision. Link the ADR it supersedes.
  • Postmortem. Blameless. Timeline, impact, root cause, why it was not caught earlier, action items (test, rule, tool, or a decision for the user).
  • Shared lesson. If the knowledge applies beyond this repo, add it to a topic file in agent-docs/lessons/ and list that file in agent-docs/README.md. Extend an existing topic file before creating a new one.

4. Promote to a rule

Promote when either holds:

  • A mistake or slow row reaches Count ≥ 2.
  • A method row has saved time at least twice, or the user stated it as a standing rule.

How to write the rule:

  • One imperative sentence, plus a short reason if it is not self-evident. Put it in the section an agent reads when it is about to make that mistake.
  • Make it checkable: "Run make test before pushing", not "Be careful with tests".
  • Do not duplicate. If a rule already covered it and the mistake happened anyway, the rule is unclear or in the wrong place: rewrite or move it instead of adding another.
  • If a test, lint, or CI check can enforce it, add that check and mention it in the rule.
  • Set the ledger row's Status to promoted → <file>#<section>.

Rule files load into every session, so keep each one under about 150 lines. Before adding to a file at that size, merge overlapping rules and delete rules whose subject no longer exists.

Sweep across sessions

A cost that is small in each session can be large in total. Run a sweep on a schedule, for example weekly, or when the user asks:

  1. Run session-stats.py --since 7d. Add --json to read the numbers in a script.
  2. For each finding, look for a ledger row with the same root cause. On a match, increment Count once per sweep, not once per session. Otherwise add a row.
  3. A sweep runs without the user. It does not edit rule files. For each row that reaches the promotion threshold, write the proposed rule and set Status to proposed → <file>#<section>. Put the change in a pull request where the rule file is in a repository; otherwise list it for the user.
  4. Report the top findings, the ledger changes, and the proposals in one short message.

5. Report

End your final message with one short line, for example: RSI: L-0004 count 2 → promoted to backend/AGENTS.md#Shared Schema; regression test in internal/admin/user_test.go. If nothing was recorded, say nothing about RSI.

Do not

  • Do not write a postmortem for a slip you caught yourself before committing.
  • Do not record secrets, tokens, customer data, or email addresses in any document.
  • Do not edit a repo's main checkout to add a test, ADR, or rule.
  • Do not let the retrospective delay delivery. Open the PR first and do the retrospective while CI runs.

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة أثناء تحميل المهارة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Agent Rsi؟

Agent retrospective and self-improvement loop. Run at the end of any task that changed code, docs, config, pull requests, or deployments, and whenever a task failed, was redone, or the user corrected you. Records what worked and what failed, turns each failure into regression tests, an ADR, and a postmortem, counts repeated mistakes in agent-docs/ledger.md, and promotes repeated mistakes and proven methods into the right AGENTS.md. Triggers: "复盘", "总结经验", "postmortem", "retro", "RSI", "沉淀", or a Stop hook asking for a retrospective.

لماذا تستخدم Agent Rsi على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Agent Rsi عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Agent Rsi في TypingMind؟

افتح الإضافات → المهارات → التثبيت من GitHub في TypingMind والصق https://github.com/luoling8192/skills/tree/main/plugins/agent-rsi/skills/agent-rsi. يقرأ TypingMind ملف SKILL.md الخاص بها، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Agent Rsi؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Agent Rsi؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Agent Rsi معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Agent Rsi مجانية؟

نعم. نشرها luoling8192 على GitHub بموجب ترخيص MIT. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا البريدية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇