Cmd Latest Msg

Store or retrieve the latest agent message to /tmp/agents/{agent}/

9 starsAI, LLMs & Agents Plugin marketplace

Install

Claude Code plugin
/plugin marketplace add Olshansk/agent-skills

The repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add Olshansk/agent-skills --skill cmd-latest-msg
Manual install
git clone --depth 1 https://github.com/Olshansk/agent-skills.git /tmp/agent-skills
mkdir -p ~/.claude/skills
cp -r /tmp/agent-skills/skills/cmd-latest-msg ~/.claude/skills/cmd-latest-msg

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Latest Message 

Persist the last agent message to disk for cross-agent visibility.

## Instructions

1. Parse the user's input after `/cmd-latest-msg`.

2. **`help`** (or no argument) — print usage and stop:

   ```
   Usage:
     /cmd-latest-msg save             — save your last message
     /cmd-latest-msg use              — read latest from the current agent
     /cmd-latest-msg use <agent>      — read latest from claude|codex|gemini
     /cmd-latest-msg help             — show this usage
   ```

3. **`save`** — save the last assistant message:

   a. Determine which agent you are from runtime context:
      - Claude Code → `claude`
      - Codex CLI → `codex`
      - Gemini CLI → `gemini`
      - If inference fails, default to `codex`

   b. Create the output directory:

   ```bash
   mkdir -p /tmp/agents/<agent>
   ```

   c. Capture your **last assistant message** — the response you gave immediately before the user invoked this skill.

   d. Write it to two files using the Write tool:
      - `/tmp/agents/<agent>/latest.md` — always overwrite
      - `/tmp/agents/<agent>/<unix_timestamp>.md` — timestamped copy (use `date +%s` to get the timestamp)

   e. Confirm with:

   ```
   Stored to:
     /tmp/agents/<agent>/latest.md
     /tmp/agents/<agent>/<timestamp>.md
   ```

4. **`use`** — display the latest message for the current agent:

   a. Infer the current agent using the same runtime-context rules as `save`.
Read the full skill on GitHub

Details

Skill name
cmd-latest-msg
Path
skills/cmd-latest-msg/SKILL.md
License
MIT
Repo updated
18 November 2026

FAQ

What does the Cmd Latest Msg skill do?

Store or retrieve the latest agent message to /tmp/agents/{agent}/

How do I install the Cmd Latest Msg skill?

Claude Code plugin: /plugin marketplace add Olshansk/agent-skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Cmd Latest Msg popular?

It lives in Olshansk/agent-skills, which has 9 GitHub stars and 0 forks.

Related skills

Cmd Agent Persona Set

9

Olshansk/agent-skills

Prime the agent with a behavioral persona for the conversation

AI, LLMs & Agents

Cmd Clean Code

9

Olshansk/agent-skills

Improve code readability without altering functionality using idiomatic best practices

Software Development

Cmd Code What

9

Olshansk/agent-skills

Catch the user up on what the agent has been doing in the current session with 3-5 ultra-tight bullet points. Use when the user invokes /cmd-what, asks "what are you doing", "what did you do", "catch me up", "status", "where are we", or otherwise needs a fast situational summary of in-flight agent work.

Software Development

Cmd Session Commit

9

Olshansk/agent-skills

Capture learnings from the current coding session and update AGENTS.md. Use when the user asks to close the loop, run session-commit, record best practices, or update agent instructions based on recent work.

AI, LLMs & Agents

Cmd Skills Local Repo

9

Olshansk/agent-skills

Scaffold cross-tool repo-local skills and agent instructions with canonical source in .agents/ and symlinks for Claude, Codex, Gemini, and Codex-home

AI, LLMs & Agents

Agents Md Lint

9

borkweb/skills

Audit and trim AI agent instruction files (AGENTS.md, CLAUDE.md, CONVENTIONS.md, .cursorrules, etc.) by testing which facts an AI agent can discover from code alone. Use when asked to lint, audit, optimize, prune, or trim any agent instruction file in a repository. Removes redundant documentation that wastes context tokens. Supports a dry-run mode that reports findings without modifying files.

AI, LLMs & Agents

Browse the most popular Claude skills, all ai, llms & agents skills, or write your own with the skills generator.