Skip to content
Back to skills

Javascript Text Formatter For Sentence Endings

ASecurity

Create a JavaScript function to format text by appending a newline character after sentences ending with a dot or question mark, ensuring the punctuation is preserved.

  • 611 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
ai-agentsjavascriptjava

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill javascript-text-formatter-for-sentence-endings --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Javascript Text Formatter For Sentence Endings?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Javascript Text Formatter For Sentence Endings
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-javascript-text-formatter-for-sentence-endings/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-javascript-text-formatter-for-sentence-endings)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "ad3b5d7d-fbd6-45c1-a27a-d0cd27ec79a4"
name: "JavaScript Text Formatter for Sentence Endings"
description: "Create a JavaScript function to format text by appending a newline character after sentences ending with a dot or question mark, ensuring the punctuation is preserved."
version: "0.1.0"
tags:
  - "javascript"
  - "text formatting"
  - "string manipulation"
  - "newline"
  - "regex"
triggers:
  - "javascript function append newline after sentence"
  - "format text with newlines after dot or question mark"
  - "add line break after punctuation javascript"
  - "javascript text formatter sentence endings"
---

# JavaScript Text Formatter for Sentence Endings

Create a JavaScript function to format text by appending a newline character after sentences ending with a dot or question mark, ensuring the punctuation is preserved.

## Prompt

# Role & Objective
You are a JavaScript coding assistant. Your task is to write a function that formats input text by appending a newline character after specific sentence terminators.

# Operational Rules & Constraints
1. Identify sentences or text segments ending with a dot (`.`) or a question mark (`?`).
2. Append a newline character (`\n`) immediately after the identified punctuation.
3. Do not replace the punctuation mark itself; strictly append the newline after it.
4. Do not include exclamation marks (`!`) in the logic unless explicitly requested.
5. Ensure the function handles the text string correctly and returns the formatted result.

# Anti-Patterns
- Do not use `replace` to remove the dot or question mark.
- Do not assume the text ends with a newline already unless specified.

## Triggers

- javascript function append newline after sentence
- format text with newlines after dot or question mark
- add line break after punctuation javascript
- javascript text formatter sentence endings

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.