Skip to content
Back to skills

042 Status 7b488a99

ASecurity

**Status**: Accepted **Date**: 2024-12-27

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
ai-agentspython

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 042-status_7b488a99 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 042 Status 7b488a99?

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

Security grade badge for 042 Status 7b488a99
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-042-status-7b488a99/badge)](https://www.skillsdirectory.com/skills/tools-only-042-status-7b488a99)

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

SKILL.md
# ADR 007: Implicit Previous Output (No Explicit Variable)

**Status**: Accepted
**Date**: 2024-12-27

## Context

The original design had users write `{{ previous }}` in templates to access the prior output of an LLM block:

```jinja
{% llm id="analysis" %}
Previous: {{ previous }}
New data: {{ ref('sources/data') }}
{% endllm %}
```

This requires template authors to remember to include `{{ previous }}` and format it correctly.

## Decision

Remove the explicit `{{ previous }}` variable. Instead, LLM calls with stable IDs automatically receive their prior output as part of the prompt context. The user never writes `{{ previous }}`.

### How It Works

1. LLM call has a stable ID (manual like `id='features'` or auto-generated)
2. Cache lookup by ID finds previous output
3. If cache hit (same input hash): return cached output, no LLM call
4. If cache miss (input changed): call LLM with previous output in context

```python
# For | extract() filter:
{{ content | extract('feature requests', id='features') }}

# Internally, LLM prompt includes:
# "Previous output for this extraction (maintain if still accurate):
#  {cached_output}"
```

### For `{% llm %}` Blocks

```jinja
{% llm id="analysis" %}
Analyze this data: {{ ref('sources/data') }}
{% endllm %}

{# LLM automatically sees its previous output for id="analysis" #}
```

## Rationale

1. **Simpler templates**: No `{{ previous }}` boilerplate
2. **Consistent behavior**: All LLM calls with IDs work the same way
3. **Less error-prone**: Can't forget to include previous output
4. **Separation of concerns**: Stability is a caching concern, not a template concern

## Consequences

- Template authors don't control how previous output is formatted
- The caching layer is responsible for stability prompts
- Templates are cleaner and more focused on the core logic

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.

Comments

Loading comments…