Hmmm. Necromancer, you say?...Ok, I'll take a swing. Following Quickleaf's 6th level caster (assuming this to be the proper translation to a CR4 foe), I'm going to try ot incorporate the Neromancer abilities of a 6th level caster, as presented for PC necromancers...I know, I know. NPCs don't follow the same rules...but when an NPC has a direct PC analogue, they should be comparable, imo.
Necromancer
Medium any humanoid, any evil alignment
AC: 12 (15 with mage armor)
HP: 42 (6d6 +6)
Speed: 30'
Ability Scores: Str:9(-1), Dex:14(+2), Con:12(+1), Int:17(+3), Wis:12(+1), Cha:9(-1)
Saves: Int. +6, Wis. +4
Skills: Arcana +6, Religion +6
Passive Perception: 11
Languages: any 4 languages
Challenge: 4 (however much XP that should be)
Traits
Spellcasting: The CR4 Necromancer is a 6th level caster. Int. is your spell ability. Spell Save DC 14; Spell Attack: +6 to hit.
The Necromancer knows the following spells:
Cantrips (4, at will): Blade Ward, Chill Touch, Light, Ray of Frost
1st level (4 slots): Detect Magic, False Life, Mage Armor, Thunderwave
2nd level (3 slots): Darkness, Misty Step, Ray of Enfeeblement
3rd level (3 slots): Animate Dead, Counterspell, Fireball, Stinking Cloud*
*note that undead will not be effected by/within a Stinking Cloud.
Undead Entourage: The Necromancer has 3 Zombies and 3 Skeletons, per the PHB. All undead servants are +6 to their HP maximum and +3 to all weapon damage.
Actions:
Spell Use
or
Staff of the Styx: Melee Weapon Attack: Those struck by the Necromancer's staff must make a Wis. save DC 14 or suffer the effects of the Dissonant Whispers spell (3d6 psychic damage & immediate reaction to flee away from the Necromancer at top speed). On a successful save, the damage is halved and the target need not move away. Hit: 3 (d6) bludegoning + 9 (3d6) psychic damage.
or
Dagger: Melee or Ranged Weapon: +5 to hit, reach 5' or 20'/60' range, 1 target, Hit: 4 (d4+2) piercing damage
Reactions:
Grim Harvest: If the Necromancer kills a creature with a spell, the Necromancer regains 2 X spell level HP.
Lair Actions:
Undead Thralls: You can animate any dead bodies you can see. These newly created undead are under the Necromancer's control, following verbal and mental commands. They can also, in this single action, reanimate any of their existing thralls form their entourage who have fallen, but not undead that has been "destroyed" by a cleric or paladin.
Aura of Gloom: Creatures within the area perceive a dimming of light, hazy shadows and chilling mists as waves of hopelessness wash through their psyche. Necromancer can use a lair action to effect an area of 60' radius. All creatures within this area must make a Cha. save, DC 14. Creatures that fail the save have disadvantage on their attack until the end of the necromancer's next turn.