agentsclimarketplace

Chain of thought prompting

Skill kjuhwa/skills-hub/skills/llm-agents/chain-of-thought-prompting

Self-correcting knowledge corpus for Claude Code — 9 stable shape clusters, bias-correction pipeline baked into contribution flow. 47 papers, 45 techniques, 1.1k skills.

Install
npx -y skills add kjuhwa/skills-hub --skill chain-of-thought-prompting

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Apply chain-of-thought prompting (zero-shot CoT, few-shot CoT, Self-Consistency) to improve LLM multi-step reasoning.

SKILL.md

1.8 KB, 339 tokens by cl100k_base, as published. Nobody here has run it

Chain-of-Thought Prompting

When to use

  • Multi-step reasoning: math word problems, logic puzzles, planning.
  • Show intermediate steps before giving the final answer.
  • Boost accuracy via Self-Consistency (sample multiple paths, majority vote).

Steps

  1. Zero-shot CoT - append the trigger phrase to the question:
Q: 10 friends playing, 7 quit, each remaining player has 8 lives. Total lives?
A: Let's think step by step.
  1. Few-shot CoT - prepend fully worked examples:
Q: 15 trees, workers plant more, now 21. How many planted?
A: 15 originally, 21 after. 21-15=6. The answer is 6.

Q: 10 friends, 7 quit, each of remaining has 8 lives. Total lives?
A:
  1. Self-Consistency - sample multiple times, pick majority answer:
from collections import Counter
answers = []
for _ in range(5):
    resp = call_llm(prompt, temperature=0.7)
    answers.append(extract_final_answer(resp))
final = Counter(answers).most_common(1)[0][0]
  1. Program-of-Thought (PoT) - instruct the model to return Python code that computes the answer.

Pitfalls

  • Wrong few-shot exemplar answers reduce accuracy while shifting answer format.
  • Self-Consistency multiplies API cost by the number of samples.

Source

  • Chapter 2 of dive-into-llms - documents/chapter2/README.md

Gives 0 of the 12 instructions most prompt engineering skills give in 339 tokens

Counted across 563 of the 626 authors here whose files we hold, read 2026-08-06

  • ask at most three clarifying questionsin 22 of 563, across 15 files
  • respond in the user input languagein 14 of 563, across 9 files
  • preserve the original intentin 13 of 563, across 11 files
  • Establish baseline metrics and collect representative examplesin 12 of 563, across 2 files
  • Identify failure modes and prioritize high-impact fixesin 12 of 563, across 2 files
  • Apply prompt and workflow improvements with measurable goalsin 12 of 563, across 2 files
  • Roll back quickly if quality or safety metrics regressin 12 of 563, across 2 files
  • validate changes with tests and roll out in controlled stagesin 12 of 563, across 2 files
  • generate quantitative baseline performance reportsin 12 of 563, across 2 files
  • create representative test scenariosin 12 of 563, across 2 files
  • treat prompts as codein 12 of 563, across 5 files
  • test prompts on diverse inputsin 12 of 563, across 8 files

Said here and by no other author read

  • append trigger phrase for zero-shot chain-of-thought
  • prepend fully worked examples for few-shot chain-of-thought
  • sample multiple responses for self-consistency
  • pick the majority answer for self-consistency
  • instruct the model to return Python code for program-of-thought
  • show intermediate steps before giving the final answer

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.