prompt-engineering-3-chain-of-thought-prompting

Sub-skill of prompt-engineering: 3. Chain-of-Thought Prompting.

5 stars

Best use case

prompt-engineering-3-chain-of-thought-prompting is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Sub-skill of prompt-engineering: 3. Chain-of-Thought Prompting.

Teams using prompt-engineering-3-chain-of-thought-prompting should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/3-chain-of-thought-prompting/SKILL.md --create-dirs "https://raw.githubusercontent.com/vamseeachanta/workspace-hub/main/.agents/skills/_archive/ai/prompting/prompt-engineering/3-chain-of-thought-prompting/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/3-chain-of-thought-prompting/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How prompt-engineering-3-chain-of-thought-prompting Compares

Feature / Agentprompt-engineering-3-chain-of-thought-promptingStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Sub-skill of prompt-engineering: 3. Chain-of-Thought Prompting.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 3. Chain-of-Thought Prompting

## 3. Chain-of-Thought Prompting


**Basic Chain-of-Thought:**
```python
COT_TEMPLATE = """
Solve this problem step by step.

Problem: {problem}

Let me think through this carefully:

Step 1: First, I'll identify the key information...
Step 2: Next, I'll determine the approach...
Step 3: Then, I'll perform the calculations...
Step 4: Finally, I'll verify and state the answer...

Solution:
"""

def chain_of_thought_prompt(problem: str) -> str:
    return COT_TEMPLATE.format(problem=problem)

# Usage
prompt = chain_of_thought_prompt(
    problem="""
    A mooring line has a breaking load of 5000 kN.
    The maximum tension is 2800 kN.
    What is the safety factor, and does it meet the API RP 2SK
    requirement of 1.67 for intact conditions?
    """
)
```

**Zero-Shot Chain-of-Thought:**
```python
def zero_shot_cot(question: str) -> str:
    """
    Zero-shot CoT: Simply append "Let's think step by step"
    Surprisingly effective for many reasoning tasks.
    """
    return f"{question}\n\nLet's think step by step."

# Usage
prompt = zero_shot_cot(
    "If a vessel offsets 50m from its mean position, and the "
    "mooring stiffness is 100 kN/m, what is the restoring force?"
)
```

**Structured Chain-of-Thought:**
```python
STRUCTURED_COT_TEMPLATE = """
Analyze this engineering problem using structured reasoning.

Problem: {problem}

Related Skills

plan-review-prompt-refresh-after-plan-edits

5
from vamseeachanta/workspace-hub

Refresh reviewer prompt files from the latest on-disk plan before every adversarial re-review. Prevents Codex/Gemini from critiquing stale plan text after local edits.

label-driven-prompt-generation-architecture

5
from vamseeachanta/workspace-hub

Pattern for building automation scripts that classify GitHub issues into prompt templates using label-based routing and extract contextual data for batch processing

agent-team-prompt-generation

5
from vamseeachanta/workspace-hub

Create self-contained execution prompts that define multi-role workflows for Codex sessions without external dependencies

live-state-aware-overnight-implementation-prompts

5
from vamseeachanta/workspace-hub

Design overnight implementation prompts that begin with a live repo/CI precheck so workers continue from partial progress instead of replaying stale handoffs.

single-terminal-gh-issue-prompts

5
from vamseeachanta/workspace-hub

Generate live issue-specific Codex prompts for a single terminal, with repo-aware path contracts and plan-gate safety checks.

provider-review-prompt-path-guard

5
from vamseeachanta/workspace-hub

Prevent adversarial review dispatch failures caused by sandbox/tmp path mismatches and provider CLI working-directory drift when launching Codex or Gemini with prompt files.

plan-resubmit-wave-prompts

5
from vamseeachanta/workspace-hub

Run a planning-only multi-terminal wave to harden blocked `status:plan-review` issues for fresh adversarial re-review, with zero implementation work and explicit path ownership.

overnight-parallel-agent-prompts

5
from vamseeachanta/workspace-hub

Design self-contained prompts for 3-5 terminals to run overnight without supervision. Ensures zero git contention, provider-optimal allocation, and a clear morning deliverable summary.

adversarial-review-prompt-refresh-guard

5
from vamseeachanta/workspace-hub

Prevent stale plan/code review prompts from being sent to Codex/Gemini after the underlying artifact changed.

absolute-path-review-prompt-dispatch

5
from vamseeachanta/workspace-hub

Prevent adversarial review dispatch failures caused by relative prompt paths, superseded background sessions, and stale completion notices when launching Codex/Gemini review jobs.

engineering-solver-domain-recon

5
from vamseeachanta/workspace-hub

Deep reconnaissance of an engineering solver domain (OrcaWave, OrcaFlex, CalculiX, OpenFOAM, etc.) across a multi-repo ecosystem — map infrastructure, issues, skills, data artifacts, machine constraints, and solver queue state before planning work.

engineering-domain-reconnaissance

5
from vamseeachanta/workspace-hub

Class-level external engineering domain reconnaissance: field development, external drive ingest planning, and source-to-artifact conversion.