Markdown Converter
Agent skill for markdown-converter
This is a freeCodeCamp Bash exercise project where the primary task is to build ASCII art in `castle.sh`. The project uses a test-driven validation approach with Mocha to verify user solutions.
Sign in to like and favorite skills
This is a freeCodeCamp Bash exercise project where the primary task is to build ASCII art in
castle.sh. The project uses a test-driven validation approach with Mocha to verify user solutions.
Important: This is NOT your repository—it's freeCodeCamp's. Follow this workflow to own your work:
https://github.com/YOUR-USERNAME/learn-nano-by-building-a-castlegit clone https://github.com/YOUR-USERNAME/learn-nano-by-building-a-castle.git cd learn-nano-by-building-a-castle
git remote add upstream https://github.com/freeCodeCamp/learn-nano-by-building-a-castle.git
git checkout -b feature/your-feature-name
main/master branch clean for future learningCommit as you solve each test level, don't wait until the end:
# After passing test 10 git add castle.sh git commit -m "feat: add initial castle echo (test 10)" # After passing test 100 git add castle.sh git commit -m "feat: add castle base (test 100)" # After passing test 400 (final) git add castle.sh git commit -m "feat: complete full castle ASCII art (test 400)" # For documentation improvements git add .github/copilot-instructions.md git commit -m "docs: add copilot instructions and git workflow" # Push all commits at once when done git push origin feature/your-feature-name
Benefits:
.mocharc.json spec arraygetLastCommand() - inspects .bash_history to verify the exact bash command executedgetFileContents() - reads and validates file content with regex patternsgetCwd() / getPreviousCwd() - tracks working directory from .cwd filegetDirectoryContents() - checks directory structurebash .freeCodeCamp/reset.sh - copies template castle.shnpm test or directly run mocha with specific test filecastle.sh to satisfy the current test requirements.bash_history and file content to verify solution correctnessTests use regex matching against file content:
// Example from 100.test.js - validates exact ASCII art format /^\s*echo\s+"\s*\n_{20}\s*\n\s*"\s*$/
echo output, not file structureTests verify exact bash execution:
// Example from 400.test.js assert(lastCommand[0] === 'bash' && /castle\.sh$/.test(lastCommand[1]))
.bash_history location: /workspace/.bash_history (two levels up from project)castle.sh content against test expectationsIf you've already finished solving all tests before learning the Git workflow:
Create a documentation branch to add improvements:
git checkout -b docs/improvements
Document your learnings in
.github/copilot-instructions.md or a new NOTES.md:
Commit and push:
git add .github/ git commit -m "docs: add learnings and workflow documentation" git push origin docs/improvements
Create a Pull Request to your fork to showcase your work
This turns completed work into a portfolio piece that demonstrates communication skills and a collaborative mindset.
cd into the project.git checkout -b feature/your-feature-name..gitignore to exclude build artifacts and editor files.Use this checklist as your prework ritual so you never start coding without version control.
Documentation is split into focused guides for clarity:
Refer to these as needed for specific guidance.