# AI use cases for Session Knowledge (nameforjt-afk/session-knowledge)

Repo: [nameforjt-afk/session-knowledge](https://github.com/nameforjt-afk/session-knowledge) | Use cases: 5 | Page: https://dedupedai.com/use-cases/nameforjt-afk-session-knowledge/

session-knowledge is a local, stdlib-only Python tool that indexes Claude Code session transcripts into a searchable knowledge base and exposes 13 MCP tools for searching them.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Find existing code for a service before writing it again: https://dedupedai.com/use-cases/nameforjt-afk-session-knowledge/check-existing-implementation-before-building/
- Recover the reasoning behind a past decision: https://dedupedai.com/use-cases/nameforjt-afk-session-knowledge/recall-why-a-decision-was-made/
- Look up the commands that failed last time: https://dedupedai.com/use-cases/nameforjt-afk-session-knowledge/avoid-repeating-a-failed-command/
- Choose the correct credential value without exposing it: https://dedupedai.com/use-cases/nameforjt-afk-session-knowledge/pick-the-right-credential-value/
- Spot logic implemented more than once across projects: https://dedupedai.com/use-cases/nameforjt-afk-session-knowledge/find-duplicated-implementations-across-projects/

## How to find existing code for a service before writing it again with Session Knowledge

Repo: [nameforjt-afk/session-knowledge](https://github.com/nameforjt-afk/session-knowledge) | Difficulty: Intermediate | Time: 15 minutes | Basis: From the README

Search past projects by external service tag to see whether the integration already exists.

**Who it is for:** A developer about to add a payment, auth, or messaging integration who suspects it was already built in another project.

**The problem:** grep only finds code if you already know the function or token name, so existing integrations are easy to miss and get rebuilt.

**The outcome:** A list of existing implementations for the service, found by capability tag, before any new code is written.

### Steps

1. `git clone https://github.com/nameforjt-afk/session-knowledge.git`
2. `cd session-knowledge` then `bash install.sh`
3. Restart Claude Code.
4. `python3 -m sessionmcp.cli index`
5. `python3 -m sessionmcp.cli code find --capability stripe`

### Prompt to paste into your agent

```text
In the session-knowledge repo, call find_implementation with capability <service-name> before writing new integration code. Expect a list of existing implementations with their file paths. Verify that one returned file still exists on disk before reusing it.
```

### Caveat

The code index only reads Python, JS, and TS files and only scans projects with at least 2 sessions in the last 45 days, so a service built in another language or a one-session project will not appear.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/nameforjt-afk-session-knowledge/check-existing-implementation-before-building/

## How to recover the reasoning behind a past decision with Session Knowledge

Repo: [nameforjt-afk/session-knowledge](https://github.com/nameforjt-afk/session-knowledge) | Difficulty: Intermediate | Time: 15 minutes | Basis: From the README

Search your own past instructions and track how a standard changed over time.

**Who it is for:** A developer or tech lead who needs to explain why a design, pricing rule, or standard was chosen months earlier, possibly in a different project.

**The problem:** The rationale sits in thousands of past instructions across sessions, and the current project directory cannot see the history from other directories.

**The outcome:** The matching instructions you gave earlier, and a month-by-month view of how the decision changed.

### Steps

1. `git clone https://github.com/nameforjt-afk/session-knowledge.git`
2. `cd session-knowledge` then `bash install.sh`
3. Restart Claude Code.
4. `python3 -m sessionmcp.cli search "pricing" --kind user_instruction`
5. `python3 -m sessionmcp.cli evolution "auth design"`

### Prompt to paste into your agent

```text
Using the session-knowledge repo, call search_sessions with the query <topic words> and then track_evolution on the same topic. Expect your own past instructions on that topic plus a monthly view of changes. Verify the dates on the returned instructions match the expected period before quoting them.
```

### Caveat

Search is AND, so more words return fewer hits; use the two or three words you would have typed back then rather than a full sentence.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/nameforjt-afk-session-knowledge/recall-why-a-decision-was-made/

## How to look up the commands that failed last time with Session Knowledge

Repo: [nameforjt-afk/session-knowledge](https://github.com/nameforjt-afk/session-knowledge) | Difficulty: Intermediate | Time: 15 minutes | Basis: From the README

Filter past Bash and MCP calls to only the failures so you do not repeat known traps.

**Who it is for:** A developer hitting a flaky deploy, build, or third-party API call who thinks they have seen this error before.

**The problem:** The fix for a past failure is buried in tool call history, and re-running the failing command wastes time.

**The outcome:** The past failed calls for the topic, with arguments and results, so the known trap is visible before retrying.

### Steps

1. `git clone https://github.com/nameforjt-afk/session-knowledge.git`
2. `cd session-knowledge` then `bash install.sh`
3. Restart Claude Code.
4. `python3 -m sessionmcp.cli tool "docker build"`
5. `python3 -m sessionmcp.cli tool "stripe" --errors`

### Prompt to paste into your agent

```text
Using the session-knowledge repo, call find_tool_call with a query for <command or service> and errors_only set to true. Expect past failed calls with their arguments and results. Verify the arguments before rerunning any command.
```

### Caveat

The tool history comes from Claude Code transcripts only, so calls made in Cursor, Copilot, or outside Claude Code will not show up.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/nameforjt-afk-session-knowledge/avoid-repeating-a-failed-command/

## How to choose the correct credential value without exposing it with Session Knowledge

Repo: [nameforjt-afk/session-knowledge](https://github.com/nameforjt-afk/session-knowledge) | Difficulty: Intermediate | Time: 15 minutes | Basis: From the README

List variable names, then review ranked candidate values in masked form.

**Who it is for:** A developer who needs the staging or production DATABASE_URL or another key and remembers using several different values.

**The problem:** The same variable name often has several real values across apps and environments, and picking the wrong one causes errors.

**The outcome:** The correct variable name and a ranked set of masked candidates, with the call site each one came from.

### Steps

1. `git clone https://github.com/nameforjt-afk/session-knowledge.git`
2. `cd session-knowledge` then `bash install.sh`
3. `python3 -m sessionmcp.cli creds list`
4. `python3 -m sessionmcp.cli creds get DATABASE_URL --masked` (inferred, check the README)
5. `python3 -m sessionmcp.cli verify-redaction`

### Prompt to paste into your agent

```text
In the session-knowledge repo, call list_credentials to find the variable name for <service>, then call get_credential in masked form only. Expect ranked candidates with their call sites and no plaintext shown. Verify that the chosen candidate is not a documentation example before using it.
```

### Caveat

Doc examples and made-up values are also extracted as candidates, so blacklist fakes with creds forget --fingerprint rather than deleting them, since deleting alone is undone by the next daily re-scan.

Risk, credentials: Plaintext values are stored in vault.db at mode 0600 and creds get returns them, so keep output in masked form and never commit or sync the index directory.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/nameforjt-afk-session-knowledge/pick-the-right-credential-value/

## How to spot logic implemented more than once across projects with Session Knowledge

Repo: [nameforjt-afk/session-knowledge](https://github.com/nameforjt-afk/session-knowledge) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Run the duplicate-implementation report to find copies and mark the canonical version.

**Who it is for:** A developer or team lead maintaining several related repos who suspects the same logic was copied into multiple places.

**The problem:** Copied implementations drift apart over time, and no single project directory shows the duplicates.

**The outcome:** A report of what was implemented several times and which projects are forks, plus a canonical file you can declare.

### Steps

1. `git clone https://github.com/nameforjt-afk/session-knowledge.git`
2. `cd session-knowledge` then `bash install.sh`
3. `python3 -m sessionmcp.cli index`
4. `python3 -m sessionmcp.cli code dup`
5. Create ~/.claude/knowledge/canonical.json to claim the file that should be the canonical implementation. (inferred, check the README)

### Prompt to paste into your agent

```text
Using the session-knowledge repo, call list_duplication and review the output for <capability> across projects. Expect a list of repeated implementations and any projects marked as forks. Verify each flagged duplicate by opening the file before proposing a canonical version.
```

### Caveat

Duplication is only reported for the Python, JS, and TS files inside the auto-derived or manually set project directories, so duplicates in other directories or languages are invisible.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/nameforjt-afk-session-knowledge/find-duplicated-implementations-across-projects/
