DEV Community

Cristian Tala
Cristian Tala

Posted on

Why My AI Agent Kept Duplicating Work (And How I Fixed It)

The Problem Nobody Tells You About AI Agents

I've been using Nyx, my autonomous AI agent built on OpenClaw, for 18 days. In that time I've created:

  • 18 specialized skills (WordPress, Replicate, Late API, Listmonk, etc.)
  • 3 content standards (blog posts, social media, glossary)
  • 8 documentation modules
  • Dozens of Python scripts to automate my stack

The drama: Every time Nyx started a new task, she forgot that a skill for it already existed.

Result: duplicated work, creating solutions from scratch, ignoring research we'd already done.

This isn't the AI's fault. It's how I organized the information.

Why AI Agents Forget (And How I Fixed It)

The Technical Problem

LLMs (large language models) don't have persistent memory. Each conversation is a new session. Even if you have context files (AGENTS.md, MEMORY.md, etc.), the agent has to decide what to read.

If you say "create a course design standard," there are two options:

❌ Bad option:
Nyx creates from scratch based only on immediate context → ignores the instructional-design skill that already existed

✅ Good option:
Nyx checks skills/INDEX.md → finds the relevant skill → reads the complete SKILL.md → creates based on existing knowledge

The difference isn't the AI. It's the system.

The Solution: INDEX.md as a Mandatory Table of Contents

I created skills/INDEX.md — a centralized file listing ALL skills with descriptions of when to use them.

Before (Chaotic):

skills/
├── replicate-api/
├── wordpress-api/
├── late-api/
└── ... (18 folders with no global documentation)
Enter fullscreen mode Exit fullscreen mode

Nyx had to guess if a relevant skill existed.

After (Structured):

skills/INDEX.md:

### replicate-api
**When to use:** Image generation (blog posts, social media, headers)
**Default style:** Synthwave (cyan + electric green)
**Docs:** skills/replicate-api/SKILL.md

### wordpress-api
**When to use:** Create/update posts, upload media, configure SEO
**Sites:** cristiantala.com, ecosistemastartup.com
**Docs:** skills/wordpress-api/SKILL.md
Enter fullscreen mode Exit fullscreen mode

Now the instruction in AGENTS.md is clear:

Before creating anything new, ALWAYS check skills/INDEX.md.

Applications Beyond AI Agents

This system isn't just for AI agents. It works for any team that accumulates knowledge.

Use Cases:

1. Tech startups:

  • Skills = reusable code modules
  • INDEX.md = component catalog
  • Each skill has SKILL.md with examples, API limits, known issues

2. Marketing agencies:

  • Skills = playbooks from successful campaigns
  • INDEX.md = when to use which framework
  • Ex: "B2B SaaS client" → Skill linkedin-outreach

3. Support teams:

  • Skills = troubleshooting procedures
  • INDEX.md = symptoms → solution
  • Ex: "error 500" → Skill debug-backend

4. Freelancers/consultants:

  • Skills = deliverables by project type
  • INDEX.md = reusable templates

The pattern is the same: capture knowledge once, reuse it always.

The Numbers (Because Data > Anecdotes)

Before INDEX.md system (Jan 27 - Feb 10):

  • Average time per new task: 45 min (included rediscovering info)
  • Duplicates: ~30% (recreating solutions that already existed)
  • Documentation: Ad-hoc (each skill isolated)

After INDEX.md system (Feb 11-14):

  • Average time per new task: 18 min (↓60%)
  • Duplicates: ~5% (only when a skill genuinely didn't exist)
  • Documentation: Centralized (INDEX.md as source of truth)

Real example (Feb 13, 2026):

  • Task: "Generate social media headers"
  • Before: Find tool, create prompt from scratch → 30 min
  • After: Check INDEX.md → Replicate API skill → 8 min

Savings: 22 min per similar task.

With 3-5 tasks/day, that's ~70 min/day recovered.

How to Implement This (Without OpenClaw)

You don't need an autonomous AI agent. This works with:

  • ChatGPT/Claude with projects (upload INDEX.md as context)
  • Notion/Obsidian (INDEX.md as central dashboard)
  • Shared Google Doc (team checks before creating)

Minimum Template:

INDEX.md:

## Resource Catalog

### [Resource Name]
**When to use:** [Clear description of the scenario]
**Output:** [What it produces]
**Docs:** [Link to complete documentation]

---
**Golden rule:** Before creating something new, check this file.
Enter fullscreen mode Exit fullscreen mode

That's it. Three fields per resource.

Lessons Learned (With Vulnerability Included)

❌ Mistakes I Made:

1. Assuming "the agent will know"

  • Reality: If it's not explicitly documented, it gets forgotten.

2. Documenting but not centralizing

  • Having 18 SKILL.md files without INDEX.md = having 18 books without a catalog.

3. Not making the process mandatory

  • If INDEX.md is "recommended" vs "mandatory," it gets ignored.

✅ What Worked:

1. Process > Tool

  • OpenClaw is the executor, but the INDEX.md system is the brain.

2. Automated daily optimization

  • Cron at 3 AM checks INDEX.md integrity, fixes broken paths.

The Meta-Learning

This post IS an example of the system.

Process: Nyx checks skills/INDEX.md → finds relevant skills → uses content standards → generates featured image → publishes draft → adds to distribution pipeline.

All this without me specifying each step. Just: "Generate an SEO-optimized draft post."

That's the power of the system.

Resources

If you want to explore self-hosting:

  • Hostinger VPS ($12/month, enough for OpenClaw + n8n + Listmonk + WordPress)
  • n8n for workflow automation

Want to connect with others building similar systems? Join Cágala, Aprende, Repite — we share real use cases, code snippets, and troubleshooting.

Cristian Tala

Founder of Pago Fácil (exit $23M), angel investor, AI builder

📝 Originally published in Spanish at cristiantala.com

Top comments (0)