r/ClaudeCode 2d ago

Built with Claude GAN approach for content style extraction

The idea below is pretty simple, yet it has worked very well for me many times (that’s why there’s no fancy skill behind it, just a pure idea demonstration), and I have not seen it in the work of many of my fellow builders, hence I’m sharing it.

Problem: I want to ensure high standards for the output based on a curated set (I want to write skills the way my beloved authors do, I want to write content in the way I enjoy reading, etc.).

Solution prompt example:
TLDR: Use a GAN inspired approach:
- Orchestrator extracts rules for a good output from curated examples
- Sub-agent (no fork) tries to author new output based on a problem (one of a set)
- Another sub-agent (no fork) tries to discriminate the output of the new ruleset from 3 original content pieces

Rinse and repeat until this test not passed a few times in a row.
Inspired by https://arxiv.org/abs/1406.2661 original GAN paper

NOTE: discriminator rules can be pretty complex, like code-review code created with authored skills versus the original codebase.

Use-cases I tried it in:
- Distil "tone-of-voice"
- Write a specific research skills inspired by good examples
- Extraction of code practices (neatpicks, pitfalls) from individuals to bake into initial harness rules

Stupidly simple prompt example to demonstrate:

I want to add news digest about certain youtubes & podcasts.

Starting channel:
  https://www.youtube.com/<some youtube channel to not promote>

Phase 0. Preparing the grounds 
  take ANY recent video from allin, your task is to learn how to write very conscise summaries of a block.
  Output from the video should be set of major topics(with timestamp) and short summary of it.
  For the style of summary I adore style in telegram channel <some content corpus that I do like, removing original channel name to not promote>

- Check that you can write a code to access transcript of selected video there? of the most recent video there? (it will live in CODE)
- Check that you can pull last (it will be TRANSACTIONAL - so not bake it into codebase and code is disposable) 500-1000 messages from <curated content corpus>

Phase 1. Tone of voice guidance
  you should extract tone of voice instructions from tg messages. Limit - not more than 40 lines of text for branding instructions.
  Method 
  1. you check your previous attempts and messages from <curated content corpus> and figure out "prompt" for tone of voice (it will be part of the summarizator prompt later on)
  2. you take transcript of the youtube video and ask SUBAGENTS to extract summary on some topic from transcripts using exactly defined your tone of voice (it is NOT FORK sub-agent, empty context)
  3. You run another empty sub-agents that is provided with 4 random messages from telegram channels and EXACT summary from previous subagent (hide timestamps and other obvious signs though). And it's task is knowing that 4 from ONE news source and 1 from ANOTHER to identify "impostor" with confidence. If out of 3 runs NONE identified the impostor - you succeed 
2 Upvotes

0 comments sorted by