# Sustainability Summary

> Retrieve time-windowed relevant sustainability RSS evidence from the RSS metadata SQLite database and optionally join DOI-keyed enriched content from a separate fulltext SQLite database. Use when generating grounded daily, weekly, monthly, or custom-range digests after relevance labeling.

- **Type:** Skill
- **Install:** `agentstack add skill-tiangong-ai-agent-skills-sustainability-summary`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [tiangong-ai](https://agentstack.voostack.com/s/tiangong-ai)
- **Installs:** 0
- **Category:** [Databases](https://agentstack.voostack.com/c/databases)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [tiangong-ai](https://github.com/tiangong-ai)
- **Source:** https://github.com/tiangong-ai/agent-skills/tree/main/sustainability-summary

## Install

```sh
agentstack add skill-tiangong-ai-agent-skills-sustainability-summary
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Sustainability Summary

## Core Goal
- Read only relevant (`is_relevant=1`) records from RSS DB.
- Build compact RAG context from DOI-keyed entries.
- Include optional enriched content from separate fulltext DB `entry_content` when available.
- Let the agent synthesize final summary text with evidence anchors.

## Triggering Conditions
- Receive requests for daily/weekly/monthly sustainability digests.
- Receive requests for custom date-range summaries.
- Need evidence-grounded output from labeled RSS entries and enriched content.

## Input Requirements
- Required tables: `feeds`, `entries` (from `sustainability-rss-fetch`).
- `entries` must be DOI-keyed and relevance-labeled.
- Optional fulltext DB table: `entry_content` (from `sustainability-fulltext-fetch`).
- RSS DB and fulltext DB must be different files.

## Workflow
1. Build retrieval context by time window.

```bash
export SUSTAIN_RSS_DB_PATH="/absolute/path/to/workspace-rss-bot/sustainability_rss.db"
export SUSTAIN_FULLTEXT_DB_PATH="/absolute/path/to/workspace-rss-bot/sustainability_fulltext.db"

python3 scripts/time_report.py \
  --rss-db "$SUSTAIN_RSS_DB_PATH" \
  --content-db "$SUSTAIN_FULLTEXT_DB_PATH" \
  --period weekly \
  --date 2026-02-10 \
  --max-records 120 \
  --max-per-feed 20 \
  --summary-chars 8192 \
  --fulltext-chars 8192 \
  --pretty \
  --output /tmp/sustainability-weekly-context.json
```

2. Generate final summary from returned `records` + `aggregates`.

3. Cite evidence using DOI + URL for key claims.

## Time Window Modes
- `--period daily --date YYYY-MM-DD`
- `--period weekly --date YYYY-MM-DD`
- `--period monthly --date YYYY-MM-DD`
- `--period custom --start ... --end ...`

## Default Fields
- `doi,timestamp_utc,timestamp_source,feed_title,feed_url,title,url,summary,fulltext_status,fulltext_length,fulltext_excerpt`

## Configurable Parameters
- `--rss-db`
- `--content-db`
- `SUSTAIN_RSS_DB_PATH`
- `SUSTAIN_FULLTEXT_DB_PATH`
- `--period`
- `--date`
- `--start`
- `--end`
- `--max-records`
- `--max-per-feed`
- `--summary-chars`
- `--fulltext-chars`
- `--top-feeds`
- `--top-keywords`
- `--fields`
- `--output`
- `--pretty`
- `--fail-on-empty`

## Error Handling
- Missing required DOI-based tables: fail fast with setup guidance.
- RSS DB and fulltext DB path collision: fail fast and require separate files.
- Invalid date/time/field list: return parse errors.
- Missing `entry_content`: continue in metadata-only mode.
- Empty relevant set: return empty context; optional failure with `--fail-on-empty`.

## References
- `references/time-window-rules.md`
- `references/report-format.md`

## Assets
- `assets/config.example.json`

## Scripts
- `scripts/time_report.py`

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [tiangong-ai](https://github.com/tiangong-ai)
- **Source:** [tiangong-ai/agent-skills](https://github.com/tiangong-ai/agent-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-tiangong-ai-agent-skills-sustainability-summary
- Seller: https://agentstack.voostack.com/s/tiangong-ai
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
