Skip to content

teaceo-debug/DEEP6 / .claude/skills/nt8-build-verify

nt8-build-verify

Verified

FileKindSize
README.mdmarkdown13.6 KB
SKILL.mdskill md1.5 KB
fixes/BRACE_MISMATCH.mdmarkdown5.1 KB
fixes/CS0019.mdmarkdown4.7 KB
fixes/CS0101.mdmarkdown4.9 KB
fixes/CS0103.mdmarkdown4.0 KB
fixes/CS0246.mdmarkdown5.4 KB
fixes/CS0535.mdmarkdown3.6 KB
fixes/CS1061.mdmarkdown5.0 KB
fixes/MISSING_ATTRIBUTE.mdmarkdown5.9 KB
knowledge.mdmarkdown3.5 KB
lib/__init__.pyscript0 B
lib/diagnostics.pyscript2.3 KB
lib/nt8_paths.pyscript3.8 KB
scripts/compile_editor.ps1script5.1 KB
scripts/compile_headless.ps1script9.2 KB
scripts/deploy.ps1script2.6 KB
scripts/fix_loop.ps1script19.7 KB
scripts/fix_router.pyscript15.8 KB
scripts/install_indicator.ps1script16.0 KB
scripts/modal_detect.ps1script10.9 KB
scripts/orchestrator.ps1script19.8 KB
scripts/parse_errors.pyscript4.6 KB
scripts/runtime_check.ps1script2.9 KB
scripts/screenshot_chart.ps1script7.5 KB
scripts/verify_visual.pyscript8.0 KB
scripts/workspace_mutator.pyscript17.6 KB

fixes/CS0103.md

View on GitHub
# CS0103 — Name does not exist in current context

## Pattern
`error CS0103: The name 'X' does not exist in the current context`

## Root Causes (ordered by likelihood)
1. Accessing a property or method in the wrong `State` (e.g., reading `BarsArray` before `State.DataLoaded`)
2. Missing `this.` prefix on an inherited member (rare in C# but occurs with shadowed names)
3. Typo in member name (case-sensitive mismatch)
4. Missing `using` directive for an extension method or static class

## Fix Strategies

### Strategy 1: Wrong State guard
- **Detect**: Error references a property like `BarsArray`, `Instrument`, `Close`, `High`, `Low`, `Open`, `Volume`, `CurrentBar`, or any `Series<T>` field. The access is inside `OnStateChange` at a state earlier than `State.DataLoaded`, or inside a constructor.
- **Lookup**: NT8 state machine order: `SetDefaults` → `Configure` → `DataLoaded` → `Historical` → `Realtime` → `Terminated`. Data properties are only valid from `State.DataLoaded` onward.
- **Fix**: Wrap the access in the correct state guard or move initialization to `State.DataLoaded`.
- **Verify**: Confirm the property is only accessed after `State.DataLoaded` is reached.

```csharp
// Wrong: accessing BarsArray in Configure
if (State == State.Configure)
{
    int count = BarsArray[0].Count; // CS0103 or NullReferenceException
}

// Correct: defer to DataLoaded
if (State == State.DataLoaded)
{
    int count = BarsArray[0].Count;
}
```

### Strategy 2: Typo in member name
- **Detect**: The name in the error message is close to but not identical to a known NT8 or DEEP6 member (e.g., `currentbar` vs `CurrentBar`, `closeprice` vs `Close`).
- **Lookup**: NT8 NinjaScript API uses PascalCase for all public members. Check the exact spelling in the NT8 API reference or the base class source.
- **Fix**: Correct the casing or spelling to match the declared member name exactly.
- **Verify**: The corrected name resolves without error and matches the intended API member.

### Strategy 3: Missing `using` directive for extension method
- **Detect**: The name is a method that exists in a known namespace but the file lacks the corresponding `using` statement. Common with LINQ (`Where`, `Select`, `FirstOrDefault`) or NT8 extension helpers.
- **Lookup**: Identify which namespace declares the method. For LINQ: `System.Linq`. For NT8 helpers: `NinjaTrader.NinjaScript`.
- **Fix**: Add the missing `using` at the top of the file.
- **Verify**: The `using` is present and the method resolves.

```csharp
// Add at top of file
using System.Linq;
```

### Strategy 4: Scope issue — variable declared in inner block
- **Detect**: The name was declared inside an `if`, `for`, or `using` block and is referenced outside that block.
- **Lookup**: Trace the variable declaration site. If it's inside a narrower scope than the usage, the fix is to hoist the declaration.
- **Fix**: Move the variable declaration to the enclosing scope (method or class level as appropriate).
- **Verify**: The variable is declared before its first use and in a scope that covers all usages.

## NT8-Specific State→Property Availability Map

| Property / Method | Earliest valid State |
|-------------------|----------------------|
| `BarsArray` | `State.DataLoaded` |
| `Instrument` | `State.Configure` |
| `Close`, `High`, `Low`, `Open`, `Volume` | `State.DataLoaded` |
| `CurrentBar` | `State.DataLoaded` (inside `OnBarUpdate`) |
| `Series<T>` fields (custom) | `State.DataLoaded` (after `AddDataSeries` or `new Series<T>(this)`) |
| `Account` | `State.DataLoaded` (strategies only) |
| `Position` | `State.DataLoaded` (strategies only) |

## Example Fix

```diff
  protected override void OnStateChange()
  {
      if (State == State.SetDefaults)
      {
          Name = "DEEP6Footprint";
      }
-     else if (State == State.Configure)
-     {
-         // CS0103: 'Close' does not exist in current context
-         double seed = Close[0];
-     }
+     else if (State == State.DataLoaded)
+     {
+         // Correct: Close is valid from DataLoaded onward
+         double seed = Close[0];
+     }
  }
```
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall