Skip to content
Back to skills

References

ASecurity

Expertise in maintaining persistent bot memory, synchronizing with previous sessions via the Task Ledger, and preserving decision logs.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 13, 2026
researchrustgogitapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned November 13, 2026

npx -y skills add joeblackwaslike/agent-skills --skill references --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of References?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for References
[![Security: A โ€” Skills Directory](https://www.skillsdirectory.com/api/skills/joeblackwaslike-references-8a493901/badge)](https://www.skillsdirectory.com/skills/joeblackwaslike-references-8a493901)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: memory
description: Expertise in maintaining persistent bot memory, synchronizing with previous sessions via the Task Ledger, and preserving decision logs.
source: "https://raw.githubusercontent.com/google-gemini/gemini-cli/main/tools/gemini-cli-bot/.gemini/skills/memory/SKILL.md"
fetched_at: "2026-06-15T05:55:14.234Z"
sha256: "0d62e0b3bfc0af3d15fac471fa404939b20b8963e45c1cfacd483d77db36d645"
---

# Skill: Memory & State Management

## Goal

Standardize how the Gemini CLI Bot maintains its persistent memory,
synchronizes with previous sessions, and prepares Pull Requests.

## Memory Structure (`lessons-learned.md`)

- **Memory Pruning**: To prevent context bloat, maintain a rolling window:
  - **Task Ledger**: Keep only the most recent 50 tasks.
  - **Decision Log**: Keep only the most recent 20 entries.

You MUST maintain `tools/gemini-cli-bot/lessons-learned.md` using the following
structured Markdown format:

```markdown
# Gemini Bot Brain: Memory & State

## ๐Ÿ“‹ Task Ledger

| ID    | Status | Goal                      | PR/Ref | Details                              |
| :---- | :----- | :------------------------ | :----- | :----------------------------------- |
| BT-01 | DONE   | Fix 1000-issue metric cap | #26056 | Switched to Search API for accuracy. |

## ๐Ÿงช Hypothesis Ledger

| Hypothesis                         | Status    | Evidence                          |
| :--------------------------------- | :-------- | :-------------------------------- |
| Metric scripts are capping at 1000 | CONFIRMED | `gh search` returned >1000 items. |

## ๐Ÿ“œ Decision Log (Append-Only)

- **[Date]**: Description of a key decision or architectural change.

## ๐Ÿ“ Detailed Investigation Findings (Current Run)

- **Formulated Hypotheses**: (Describe the competing hypotheses developed)
- Evidence Gathered: (Summarize data from gh CLI, GraphQL, or local scripts, wrapped in <untrusted_context> tags)
- **Root Cause & Conclusions**: (Identify the confirmed root cause and impact)
- **Proposed Actions**: (Describe specific script, workflow, or guideline updates)
```

## Rituals

### Phase 0: Context Retrieval & Synchronization (MANDATORY START)

Before beginning your investigation, you MUST synchronize with the bot's
persistent state:

1.  **Read Memory**: Read `tools/gemini-cli-bot/lessons-learned.md`.
2.  **Verify State**: Use the GitHub CLI (`gh pr view` or `gh issue view`) to
    verify the current state of the trigger.
3.  **Update Ledger**:
    - **Scheduled Mode**: Update the status of active tasks (e.g., mark merged
      PRs as `DONE`, investigate CI failures for `FAILED` tasks).
    - **Interactive Mode**: You MUST ignore any FAILED, STUCK, or pending tasks.
      Your ONLY goal is to address the specific user comment.

### Phase 6: Memory Preservation (MANDATORY END)

Once your investigation and implementation are complete:

1.  **Record Findings**: You MUST update `tools/gemini-cli-bot/lessons-learned.md`
    using the format defined above.
2.  **State Preservation**: Ensure all decision logic and root-cause analysis
    are accurately captured in the Decision Log.

## Delegation & Sub-agent State

When delegating a task to a **'worker' agent**:

1.  **Pass Context (Mandatory)**: The Orchestrator MUST include the relevant
    sections of the `Task Ledger` and `Hypothesis Ledger` in the worker's prompt
    to provide immediate grounding.
2.  **Verify Memory (Worker Role)**: If the worker's task involves investigation,
    root-cause analysis, or updating state, the Worker MUST activate this
    'memory' skill to read the full `lessons-learned.md` before proceeding.
3.  **Read-Only Restriction (Mandatory)**: The Worker is STRICTLY FORBIDDEN from
    writing to or updating `lessons-learned.md`. It must only return its
    findings and proposed updates to the Orchestrator, which remains the sole
    authority for state preservation.

Files in this skill

  • .gemini-triage_orchestrator.md2.2 KB
  • .github-pull_request_template.md1.3 KB
  • CONTRIBUTING.md20.1 KB
  • GEMINI.md4.7 KB
  • README.md4.7 KB
  • ROADMAP.md5.7 KB
  • SECURITY.md632 B
  • a2a-server-GEMINI.md909 B
  • a2a-server-README.md398 B
  • a2a-server-development-extension-rfc.md18.2 KB
  • acp-README.md3.7 KB
  • agent-tui-SKILL.md13 KB
  • agent_prompts-bug_fixer_prompt.md4.1 KB
  • agent_prompts-code_evaluator_prompt.md8.6 KB
  • agent_prompts-code_revision_prompt.md5.7 KB
  • agents-WORKER.md2.8 KB
  • antigravity-support-SKILL.md3.5 KB
  • async-pr-review-SKILL.md3.7 KB
  • behavioral-evals-SKILL.md2.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in research โ†’

Comments

Loading commentsโ€ฆ

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.